-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bar chart with repeated X-values #1601
Comments
Could you please share a simple example flow (i.e. an inject node and a chart node) that allows people to reproduce your problem quickly. Thanks! Indeed like you say the ui-chart node first searches whether the x-axis value already exists, and if it already exists it will replace the old y-axis value by the new one. However I would have expected that it would be possible when you inject unique timestamp x-axis values, which you display as duplicate labels via the format property: Because that format is passed in the frontend code to the ChartJs library as display format. Which I would expect to be just a visual label that can contain duplicate values like you require. But from your explanation I assume it doesn't work like that? Bart |
Bar charts are not possible for timeseries x-axes as there is no way to know how wide a bar should be. Only line and scatter charts, where a singular point can be plotted, support timeseries x-axis currently. |
Right, and timescale is also not what is needed in this case. Essentially I cannot migrate from Dashboard1, since I cannot get duplicated X-values (labels). So I have to limit the data, until this might possibly change in the Dashboard2 graph node. |
Thanks for clarifying, what are you hoping to use for your x-axis labels? Surely having the same label for more than one bar renders the chart unhelpful? |
The X axis is hours in the day. So 00-23. But the length of the graph varies from about 7 hours to about 33 hours. (Showing things like electricity prices, expected consumption, etc.) 00-23 is a sufficient and intuitive shorthand for getting an overview of - typically - the rest of today, and all of tomorrow. Especially if the bars are quite narrow, and labels like "Thu 23" or "10-23" take up unnecessary space. |
To get something like what you want, rather than feed in the hours for the x axis, set the x axis to timestamp type and feed in the full date/time. Then tell it to format the timestamp as |
For example, here is a chart configured to show the minutes only (Format
|
Thanks. I think I tried that and it didn't work, but I am not absolutely sure. Your example did not work at first glance in my setup. Not sure why. I tried something similar, but with the entire data in a single message (calculated data to show the past, current and future), and cannot get it to work as desired. And as discussed above this is not possible with the bar chart, at all, if I understand correctly? |
In what way? Are you using the latest version of the dashboard? |
For some inexplicable reason I thought you wanted a line chart! |
Using 1.22.1. No data shown in graph. I did not dig into why that might be. |
Description
Not sure if this is considered a bug or feature request.
I want to show a bar (or line) chart with duplicated X-values (labels).
This is actually showing hours on the X-axis, and the scope is the hours of today and tomorrow. I prefer to just show the hours like "00"-"23". So duplicate X-values (labels) will occur.
This currently does not work, as the second occurrence of a given duplicated hour, seems to overwrite the first occurrence.
I do have unique X (time)-related values on each input object. So if one property could be used as the X-value and another as the X-label, that would be really nice. Or some other way to achieve this :)
Have you provided an initial effort estimate for this issue?
I am no FlowFuse team member
The text was updated successfully, but these errors were encountered: