leeoniya / uPlot

📈 A small, fast chart for time series, lines, areas, ohlc & bars
MIT License
8.48k stars 370 forks source link

Is it possible to create stacked bar charts that are grouped by year ? #937

Closed LCHXYZ closed 1 month ago

LCHXYZ commented 1 month ago

I started using dygraphs some time ago without realizing that it's not maintained.

So I want to switch to µPlot. However before I do so I need to know if the following graph that I created with dygraphs could also be created with µPlot. A simple yes or no is all I need. Thanks in advance :)

Graph

With zoom:

Graph_zoom

leeoniya commented 1 month ago

probably you're looking for https://leeoniya.github.io/uPlot/demos/timeline-discrete.html ?

LCHXYZ commented 1 month ago

Yes, but it seems like µPlot has the same limitation as dygraphs. I managed to display the years on the y-axis by renaming "Device A", etc in your example to the year. The x-axis meanwhile show the timeline for 2024. It's very hacky but it works.

Anyway thanks for the example.