Multiple Charts in the Stats overview widget
Hi i am trying to build a stats overview widget where i would like to show 2 datasets to compare 2 periods. Is that possible or I need to use "big" charts widgets Or something totally custom ?
13 Replies
@Dennis Koch any thought on this ?
Please read the #✅┊rules and do not tag people.
You can do that with #apex-charts quite easily
sorry for tagging newbie error
i was talking about the small widget
Ahh, I am sure I have seen it before. What is you pass in the data as a nested array? Might not be possible though
tried that but it won't work because of the js implementation
so basically i need to find a way to override that js and i should be good
That small widget is a ‘stat chart’. What you’re showing in that screen shot would be a regular ‘chart’ widget
They are two different widgets.
I know, my issue is that i want to use the 'stats chart' to display two charts not just one to compare two dates. This could have been made easy if they 'stats chart' can accept nested array.
Then you need a custom widget.
The stats chart is not built for that. The chart widget is built for it.
Even then I think you still have issues showing two different time frames in one chart.
so even with custom widget i can't achieve something like this ?
Possibly. I’m just not sure how chart.js would handle data from a different time frame across the x axis since the dates don’t match. But if it’s possible in chart.js. It’s doable.
just use apex charts?
https://apexcharts.com/javascript-chart-demos/
ApexCharts.js
JavaScript Chart Examples & Samples Demo – ApexCharts.js
Get a glimpse of ApexCharts by exploring all the samples created using the library. You can download these JavaScript Chart Examples and use them freely.