更改日期范围时的情节区域奇怪行为

发布于 2025-02-10 01:47:55 字数 472 浏览 1 评论 0原文

我在更改Zoom(日期范围)之后显示怪异的情节区域有一个问题,

如您在以下屏幕上所示: 1m间隔

然后,当我更改为-3m: 从1m间隔到3M间隔

如果我会从-3m开始,它会在-3m的范围内正确地显示出来在第三屏幕上:当我从3m间隔开始时,noreferrer”

>是正确的,这可能是Highchart问题/错误,

I'm having an issue with Plot Area that is displaying weird after changing zoom(date range)

As you can see on the following screens:
1M interval

Then when I change to -3M:
from 1M interval to 3M interval

What's intresting if I would start from -3M it would display correctly like on the 3rd screen: When I start from 3M interval its ok

I'm pretty sure my data is correct, it's probably highchart issue/bug,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

故乡的云 2025-02-17 01:47:55

我通过将数据设置为两个点来解决问题:

{
      x: 1460937600000,
      y: 0.85
    },
    {
      x: 1514505600000,
      y: 0.85
    },

{
      x: 1460937600000,
      y: 0.85
    },
    {
      x: 1514505600000,
      y: 0.85
    },
    {
      x: 1514505600000,
      y: 0.8
    },
    {
      x: 1460937600000,
      y: 0.8
    },

http://jsfiddle.net /qouyerkp/40/
但不幸的是,它在我当地的环境中没有正常工作。因为它不会从Ymin开始。我不知道为什么。
本地env中的问题

I have managed to fix the issue by setting the data to two points:

{
      x: 1460937600000,
      y: 0.85
    },
    {
      x: 1514505600000,
      y: 0.85
    },

instead of:

{
      x: 1460937600000,
      y: 0.85
    },
    {
      x: 1514505600000,
      y: 0.85
    },
    {
      x: 1514505600000,
      y: 0.8
    },
    {
      x: 1460937600000,
      y: 0.8
    },

http://jsfiddle.net/qouyerkp/40/
but unfortunately it's not working as expected in my local env. because it won't start from Ymin. I don't know why.
issue in local env

鹿港巷口少年归 2025-02-17 01:47:55

此行为是由数据组特征引起的。您需要为区域系列禁用它:

  series: [...,
    {
      type: 'area',
      dataGrouping: {
        enabled: false
      },
      ...
    }
  ]

实时演示:

​> https://api.highcharts.com/highstock/series.area.datagrouping

docs: https://www.highcharts.com/docs/stock/data-grouping

This behaviour is caused by the data-grouping feature. You need to disable it for the area series:

  series: [...,
    {
      type: 'area',
      dataGrouping: {
        enabled: false
      },
      ...
    }
  ]

Live demo: http://jsfiddle.net/BlackLabel/6jz1cpvs/

API Reference: https://api.highcharts.com/highstock/series.area.dataGrouping

Docs: https://www.highcharts.com/docs/stock/data-grouping

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文