简体   繁体   English

即使有数据,Highchart也不显示数据范围

[英]Highchart doesn't dispaly a datarange even if there is data

I have line highcahrt and it displays well except one of the data range. 我有highcahrt行,除了其中一个数据范围外,它显示得很好。 On the same page there is a chart and grid just under the chart. 在同一页面上,图表下方有一个图表和网格。 and task names sorted on yAxsis and each task name has starttime and endtime . 和任务名称在yAxsis上排序,每个任务名称都有开始时间和结束时间。 And these results displays in the grid. 这些结果显示在网格中。 one of the task name let's call mytask has start and endtime in json format like others. 可以将任务名称之一称为mytask它的开始和结束时间与其他格式一样为json格式。 and it dispalys it in chart js file and in grid 并在图表js文件和网格中显示

yAxis: {
    tickInterval: 1,
    labels: {
        formatter: function () {
            if (tasks[this.value]) {
                return tasks[this.value].name;
            }
        }
    },
}

I debugged it and I can see its name here and in series I can see it is start and end time . 我调试了它,在这里可以看到它的名称,在series我可以看到它的开始和结束时间。 But I can't see datarange on chart . 但是我在图表上看不到数据范围。 I checked everything but no luck 我检查了一切,但没有运气

Any help appreciate 任何帮助赞赏

[I would post images but my reputation is very low ] [我会发布图片,但是我的声誉很低]

I resolved the issue . 我解决了这个问题。 I is about min and max in XAxsis . 我在XAxsis中大约是最小和最大。

xAxis: {
                type: 'datetime',
                labels: {
                    formatter: function () {

                        var mycharttime = Highcharts.dateFormat('%H:%M:%P', this.value);

                        return timsesubstringforXaxis(mycharttime);
                    }
                },
                min: start_chart_scale_dt,
                max: end_chart_scale_dt,

                title: {
                    text: displayMonthXaxiesTitle,
                    align: 'low'
                }
            },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM