chartjs / chartjs/Chart.js

Bar left/right alignment on a time scale

Open
#9,748 6 comments 1 reaction 0 assignees View on GitHub
type: enhancement
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

I need to create a combo chart with a time X axis. The chart displays various energy readings for consequetive time periods, like every five minutes. Line charts will display the actual power consumption (W) and vertical bar charts the energy consumption for the time period (kWh).
The line chart points appear at the exact date/time on the time scale. The bars are however centered on the specified starting date/time so effectively they are shifted by 0.5 time period to the left.

I would like the bars to start at the specified date/time and go until the next specified date/time. So with a 5 minute period a bar that specifies time 07:00:00 should start at 07:00:00 and end at 07:05:00.
The bar charts should be able to stack (to show imported electricity with solar electricity on top) and overlay (to show alternate energy such as gas consumption) for the same period.

Preferably there is an option that will tell the bar to align centered on the grid time (as current) or display left or right aligned relative to the grid time.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.