没有数据点的弹性图表显示

发布于 2024-09-04 18:52:39 字数 212 浏览 7 评论 0原文

我需要显示该月每个日期的商品价格。 图表可以是条形图或绘图。

问题:

假设没有 01/15/2010 的数据,那么, 有没有办法在 x 轴上显示 (01/15/2010) 但没有(条形图或绘图点)对应的 y 轴点?

即两个条形图或绘图点之间会有一个空白区域。

目前我使用 0 ,但 0 是一个有效值。

让我知道这样的显示是否可能。

I need to display price of item for every date in the month.
The chart can be Bar chart or plot chart.

Question:

Suppose there is no data available for 01/15/2010 then,
Is there a way to display (01/15/2010) on x axis but no (bar or plot point) corresponding y axis point ?

i.e. there will be a empty space between 2 bars or plot points.

Currently I am using 0 , But 0 is a valid value.

Let me know if such a display is possible.

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

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

发布评论

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

评论(2

你的心境我的脸 2024-09-11 18:52:39

不。您需要对图、条形图或柱形图使用某种类型的值。如果使用 null,则不会为该数据点保留空间。

例如,如果您有三列 — 比如说,三月、四月和五月 — 并且 dataProvider 中的值为 [3, null, 5],则四月列将不会显示,而三月和四月将各自变宽。

您可以做的是创建一个 dataTipFunction(请参阅 ChartBase),告诉用户如果数据为 0,则没有可用数据。

No. You need to use some kind of value for a plot or a bar or a column. If you use null, no space will be reserved for that data point.

For example, if you have three columns — say, March, April and May — and the values in the dataProvider are [3, null, 5], the April column will simply not show up and March and April will each get wider.

What you can do is create a dataTipFunction (see ChartBase) that tells the user no data is available if the datum is 0.

箜明 2024-09-11 18:52:39

最后,

这是解决方案。
假设我想显示以下数据 [jan, 10] [ feb , ]

第 1 步:
要隐藏条形图上的点,请从服务器发送 NaN。
在上面的示例中,这意味着 [jan,10][Feb, NaN]。
--这会导致在标题栏附近显示值的不良效果。

第 2 步:
现在隐藏数据提示,按照链接中的解决方案进行操作:
弹性图表隐藏数据提示

Finally,

Here is the solution.
Say i want show the following data [jan, 10] [ feb , ]

Step 1:
To hide the point on the Barchart, send a NaN from server.
In the above example , it would mean [jan,10][Feb, NaN].
--This causes an undesirable effect of showing the value near the title bar.

Step 2:
Now hide the data tip, Follow the solution at the link:
flex chart hide a datatip

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