HighCharts显示日期范围平均为18:00-19:59

HighCharts showing date range average 18:00-19:59

本文关键字:00-19 平均为 显示 日期 范围 HighCharts      更新时间:2023-09-26

我有一个图表,它为从Web服务收到的每个时间戳呈现一个点和一个图例。我的问题是,当你缩小图表时,会得到多个点的平均值,并创建一个点和图例,显示该时间范围的平均值。

图例当前显示的内容如下:
7月8日,星期一,18:00-19-59

但我们需要它分别读取和呈现这些点,如下所示:
7月8日,星期一18:00
7月8日,星期一19:00
7月8日星期一20:00

我已经仔细查看了高库存的文档和论坛,但看不出这个配置是在哪里设置的。我试过范围选择器和x轴,但没有成功。我假设这是一个默认为true的设置,我们只需要将其设置为false。

如有任何帮助,我们将不胜感激。

下图功能:

            $(setasid).highcharts('StockChart', {
                chart: {
                    renderTo: $('.charthold', top),
                    plotBackgroundImage: backgroundImage,
                    events: {
                        load: loader(top)
                    },
                    width: 714,
                    height: 459
                },
                scrollbar: {
                    enabled: false
                },
                rangeSelector: {
                    enabled: false
                },
                title: {
                    text: chartTitle,
                    style: {
                        color: blue,
                        fontWeight: 'bold'
                    }
                },
                loading: {
                    style: {
                        backgroundColor: 'silver'
                    },
                    labelStyle: {
                        color: 'white'
                    }
                },
                exporting: {
                    enabled: false
                },
                labels: {
                    style: {
                        color: blue
                    }
                },
                yAxis: {
                    title: {
                        text: Pricein + currencyunit + '/' + units,
                        style: {
                            color: blue,
                            fontWeight: 'normal'
                        }
                    },
                    plotLines: [{
                        value: ndata.spotPrice,
                        color: red,
                        width: 2,
                        label: {
                            text: Currentspotprice + ndata.spotPrice.toFixed(2),
                            x: 40,
                            style: {
                                color: blue,
                                zIndex: 50
                            }
                        }
                    }]
                },
                xAxis: {
                    ordinal: false
                },
                plotOptions: {
                    series: {
                        color: blue,
                        marker: {
                            enabled: true,
                            radius: 0,
                            fillColor:  '#97833c',
                            lineWidth: 0,
                            lineColor: null, // inherit from series
                            states: {
                                hover: {
                                    enabled: false
                                }
                            }
                        }
                    }
                },
                series: [{
                    name: SpotvaleLable,
                    data: ndata.data,
                    color: blue,
                    shadow: true,
                    tooltip: {
                        valueDecimals: 2
                    },
                    event:
                    {
                        update: function() { loader() }
                    }
                }]
            });

您需要禁用数据分组http://api.highcharts.com/highstock#plotOptions.series.dataGrouping