2014-11-25 106 views
0

我想在我的Highchart图中给出here之间的tickmarkplacement'between'。但我发现它只有在给出'类别'的情况下才有效。 如何使用它而不设置类别? Here是我想要使用属性'tickmarkplacement:between'的示例图。tickmarkPlacement'之间'不起作用

$(function() { 


var data=[[16,10],[24,3],[30,7],[48,8]]; 
var param= { 
      Name: "Current speed", 
      Color: "#C6C6C6 ", 
      LineStyle: "Solid", 
      SeriesType: "line", 
      LineWidth: 2, 
      TickInterval: null, 
      MinValue: null, 
      MaxValue: null, 
      Decimals: 2 
      }; 

$('#container').highcharts({ 
     chart: { 
      plotBorderWidth: 1, 
      plotBorderColor: '#E4E4E4', 
     }, 
     xAxis: { 
      title: { 
       useHTML: true, 
       text: param.Name + "(m/s )", 
      }, 
      gridLineWidth: 1, 
      min: param.MinValue, 
      max: param.MaxValue, 
      gridLineDashStyle: 'Dot', 
      tickInterval: param.TickInterval, 
      tickmarkPlacement: 'between' 
     }, 
     yAxis: { 
      title: { 
       text: 'Depth(m)', 
      }, 
      reversed: true, 
      tickLength: 50, 
      gridLineDashStyle: 'Dot' 
     }, 
     title: { 
      text: null, 
     }, 
     legend: { 
      enabled: false 
     }, 
     credits: { 
      enabled: false 
     }, 
     tooltip: { 
      useHTML: true, 
      formatter: function() { 
       return this.y; 
      } 
     }, 
     series: [{ 
      name: param.Name, 
      data: data, 
      color: param.Color, 
      dashStyle: param.LineStyle, 
      lineWidth: param.LineWidth, 
      type: "line" 
     }] 
    }); 
}); 

回答

0

根据docs它只适用于xAxis上的类别。

相关问题