Highcharts / Highmaps in ionic - карта не отображается - PullRequest
0 голосов
/ 29 января 2019
  1. Добавить плагин 'angular2-highcharts'

  2. добавить код в ionViewDidLoad ()

     var chart = Highcharts.mapChart('container', {
          chart: {
            map: 'custom/europe',
            spacingBottom: 20
          },
    
        title: {
           text: 'Europe time zones'
         },
    
        legend: {
           enabled: true
        },
    
        plotOptions: {
          map: {
            allAreas: false,
            dataLabels: {
              enabled: true,
              color: '#FFFFFF',
              style: {
              fontWeight: 'bold'
              },
          // Only show dataLabels for areas with high label rank
           format: null,
           formatter: function () {
            if (this.point.properties && this.point.properties.labelrank.toString() < 5) {
                return this.point.properties['iso-a2'];
            }
        }
            },
            tooltip: {
              headerFormat: '',
              pointFormat: '{point.name}: <b>{series.name}</b>'
          }
          }
        },
    
    
        })
    
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...