tickmarkPlacement'之间'不起作用

时间:2014-11-25 13:12:56

标签: highcharts

我想在我的Highchart图中使用tickmarkplacement'between'作为给定的here。但我发现它只有在给出'类别'时才有效。 如何在不设置类别的情况下使用它? Here是一个示例图,我想使用属性'tickmarkplacement:between'。

   $(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"
        }]
    });
 });

1 个答案:

答案 0 :(得分:0)

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