How to have a stacked bar chart represent time?

1 Answer 88 Views
Charts
Karalynn
Top achievements
Rank 1
Karalynn asked on 18 Sep 2023, 07:20 PM

I have a stacked bar chart that I want to use to emulate changes in activity. Say the chart spans 30 minutes. I want the stacks to show when each category changed activity and for how long. For example, Zone 4 Cell 10 might be active for 5 minutes, inactive for 10 minutes and then active again for 15 minutes. Zone 4 Cell 20 might have a very different activity timeline. All activities are known (eg "active", shown below as green). An example is shown below.

Is there a way to achieve this with the basic stack chart library available in Kendo React? If so, how should the data be structured to be able to achieve this?

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 20 Sep 2023, 03:56 PM

Hello, Karalynn,

The described result cannot be achieved by stacking the series in the current implementation of the chart, but you can consider adding plotbads on the place where the activity has changed and color them accordingly:

You can also control the Plotbands rendering by manually drawing them through the Drawing API in the onRender event like demonstrated here:

  • https://www.telerik.com/kendo-react-ui/components/charts/chart/elements/plot-bands/#toc-custom-plot-bands

Regards,
Vessy
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
Charts
Asked by
Karalynn
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or