Skip to content
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

[SUPPORT/FEATURE] Display the data points in a bar-chart as a time period (from-to, eg. for energy consumption) #4343

Closed
SesioN opened this issue Jun 7, 2017 · 4 comments · Fixed by #4545

Comments

@SesioN
Copy link

SesioN commented Jun 7, 2017

Chartjs 2.5

I am looking at a possibility of displaying the data points on the bar-chart so that the bar width represents/shows the given time period. This would be useful for displaying all kinds of consumption entries, like energy consumption, where you have data points that represent a consumption over time (eg. from 15:00 to 16:00 or from a whole day, week, month, year etc. )

Note: I am also using the zoom-plugin, which changes the view-point based on the zoom-level.

Example:

Like, we want to show a daily energy consumption for a time range of the month June. Now we would need 30 entries each representing a whole day, so that each bar represents exactly one day (eg. stretching between 1st and 2nd and so on..)

Any ideas on how to approach this?

@SesioN SesioN changed the title [SUPPORT/FEATURE] Display the data points in a bar-chart as a time period (eg. for energy consumption) [SUPPORT/FEATURE] Display the data points in a bar-chart as a time period (from-to, eg. for energy consumption) Jun 7, 2017
@etimberg
Copy link
Member

etimberg commented Jun 7, 2017

Not sure of the best way to support this. Once the time-series scale gets merged in v2.7 it should be closer to possible. @benmccann any thoughts based on your work with the time series charts?

@benmccann
Copy link
Contributor

If each bar represents the same amount of time then the timeseries scale should work well for you. If each bar represents a variable amount of time then you'd probably need to create a custom chart

@benmccann
Copy link
Contributor

Btw, the plan is to do some final fixes on the timeseries scale over the weekend and then send a PR for it next week

@SesioN
Copy link
Author

SesioN commented Jun 9, 2017

In the use-case that I mentioned each bar does indeed have the same width or well represents the same amount of time.

So I'll wait for 2.7, thanks allot guys 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants