如何格式化HighChartsJS工具提示,使其只显示一个x轴



这是我目前在我的图表中使用的代码,我的问题是,我似乎无法格式化工具提示,以便只有一个X轴值出现,你可以在下面的图像中看到,基本上我想完全控制X和Y点是如何发布的,因为现在我得到了一个不请自来的X轴客人。我似乎找不到一个合理的区分这个系统和任何例子来解释为什么会发生这种情况或如何阻止它。

https://drive.google.com/file/d/0B9EllFfWHFFVT1JaMEp4ZG9xYXc/view对不起,我不得不张贴一个外部图片,因为我在这里花的时间太少了…

         //call in the quants
            $(function () {
                $('#container1').highcharts({
                    chart: {
                        type: 'area'
                    },
                    title: {
                        text: 'Cost Of Program'
                    },
                    subtitle: {
                        text: 'Price of The Program'
                    },
                    xAxis: {
                        title: {
                            enabled: true,
                            text: 'Weeks '
                        },
                        categories: xAxis
                    }, 
                    yAxis: {
                        title: {
                            text: 'Cost'
                        },
                        plotLines: [{
                            value: 0,
                            width: 1,
                            color: '#808080'
                        }]
                    },
                    tooltip: {
                        pointFormat: 'Weeks In: {point.x}, {series.name}: {point.y}'
                    },
                    plotOptions: {
                        area: {
                            pointStart: 0,
                            marker: {
                                enabled: false,
                                symbol: 'circle',
                                radius: 2,
                                states: {
                                    hover: {
                                        enabled: true
                                    }
                                }
                            }
                        }
                    },
                    series: [{
                        name: 'Money Youll Win Back If You Quit',
                        data: winMoney 
                    },{
                        name: 'How Much Youll Lose If You Quit',
                        data: loseMoney
                    }, {
                        name: 'Cost of the Program (cumulative)',
                        data: ourFee
                    }]
                });
            });
        }
tooltip: {
    pointFormat: 'Weeks In: {point.x}, {series.name}: {point.y}',
    headerFormat: ""
},

最新更新