wet-boew / wet-boew

Web Experience Toolkit (WET): Open source code library for building innovative websites that are accessible, usable, interoperable, mobile-friendly and multilingual. This collaborative open source project is led by the Government of Canada.
https://wet-boew.github.io/wet-boew/index-en.html
Other
1.61k stars 660 forks source link

Chart - horizontal bar chart #8100

Open tricialimc opened 7 years ago

tricialimc commented 7 years ago

I've played around with flot.js to customize my bar charts in order to transform the graph into a horizontal bar chart. The bars did successfully turn horizontally; however, the x and y axis seem to be fixed and some bars overlap each other due to a fixed height? horizontalbarchart

Is it possible to fully customize my vertical bar chart into a horizontal bar chart?

duboisp commented 7 years ago

@tricialimc the horizontal bar chart is not currently officially supported. I know the x and y axis in flot is currently fixed by the charts plugin.

Do you want to share how you configured your example with flot? Have you used some specific flot plugin? That could help us to eventually add a such feature.

Thank you

tricialimc commented 7 years ago

Oh okay that makes sense. Thank you for the clarification!

I just included data-flot attributes within the table tag (using the jquery.flot.js files provided in WET prod files) : //<table class="wb-charts wb-charts-bar table" id="poll-table" data-flot='{"series": { "bars": { "horizontal": true } }}'>