在Highcharts中错误的极图

时间:2014-08-28 10:12:13

标签: javascript jquery highcharts

我创造了一个极地图(windrose之王)。

当我在jsfiddle中测试时,一切正常,但是当我在我的网站上运行它时,数据似乎是混乱的! (见www.meteo-pont-salomon.fr)

我检查了所有highcharts js文件,重新安装了highcharts,没有任何变化。 每个想法都很好; - )

$(function () {
  var chart;
  $(document).ready(function() {
    chart = new Highcharts.Chart({
      chart: {
        renderTo: 'c8',
        polar: true,
        type: 'area',
        backgroundColor: 'transparent',
        plotBorderWidth: 0,
        plotShadow: false,
        spacingTop: 0
      },
      legend: {
        enabled: false
      },
      tooltip: {
        useHTML: true,
        pointFormat: '<center><b>{point.y}</b></center>',
        valueSuffix: ' %'
      },
      plotOptions: {
        series: {
          pointWidth: 0.4,
          marker: {enabled: false}
        }
      },
      exporting: {
        buttons: {
          contextButton: {enabled: false}
        }
      },
      credits: {
        enabled : false,
        text: '© Météo Pont-Salomon'
      },
      title: {text: null},
      pane: {
        startAngle: 350,
        background: [{
          backgroundColor: {
            linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
            stops: [
              [0, '#FFF'],
              [1, '#333']
            ]
          },
          borderWidth: 0,
          outerRadius: '120%'
          }, {
          backgroundColor: {
            linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
            stops: [
              [0, '#333'],
              [1, '#FFF']
            ]
          },
          borderWidth: 1,
          outerRadius: '110%'
          }, {
          }, {
          backgroundColor: '#DDD',
          borderWidth: 0,
          outerRadius: '105%',
          innerRadius: '103%'
        }]
      },
      xAxis: {
        tickmarkPlacement: 'on',
        lineWidth: 0,
        categories: [
          'N',
          'NNE',
          'NE',
          'ENE',
          'E',
          'ESE',
          'SE',
          'SSE',
          'S',
          'SSO',
          'SO',
          'OSO',
          'O',
          'ONO',
          'NO',
          'NNO'
        ],
        labels: {
          distance: 7,
          align: 'center',
          x: null,
          y: 3,
          step: 2,
          style: {fontWeight: 'bold'}
        },
        offset: 12
      },
      yAxis: {
        gridLineInterpolation: 'polygon',
        lineWidth: 0,
        min: 0,
        labels: {enabled: false}
      },
      series: [{
        name: 'Vent',
        data: [8.8,15.7,9.8,8.4,7,2.6,1.3,2.4,1.1,9,9.4,9.6,5,2.4,2.2,5.3]
      }]
    });
  });
});

0 个答案:

没有答案