How can I create a horizontal bar chart using Chart.js? I can do it with Google Charts, but those have layout problems when I increase the height (previously reported). I can create vertical bar charts with Chart.js, but there is no "invert axis" option or any apparent way to switch to horizontal bars.
If you don't see those options in the chart settings, that means that this library doesn't offer it out-of-the-box, and you would again need to use the wpDataChart callbacks to switch them around.
You can take a look at their documentation here, and hopefully it'll provide some useful info.
It may be natively supported in Charts.js, but not through the free library we're using.
All possible settings for the chart are located in the chart creation wizard, and to convert vertical bars to horizontal bars you will need to use wpDataCharts callbacks.
How can I create a horizontal bar chart using Chart.js? I can do it with Google Charts, but those have layout problems when I increase the height (previously reported). I can create vertical bar charts with Chart.js, but there is no "invert axis" option or any apparent way to switch to horizontal bars.
Hi Daniel.
If you don't see those options in the chart settings, that means that this library doesn't offer it out-of-the-box, and you would again need to use the wpDataChart callbacks to switch them around.
You can take a look at their documentation here, and hopefully it'll provide some useful info.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
it is natively supported. Instead of type “bar,” it would be type “horizontalBar.”
Hello Daniel.
It may be natively supported in Charts.js, but not through the free library we're using.
All possible settings for the chart are located in the chart creation wizard, and to convert vertical bars to horizontal bars you will need to use wpDataCharts callbacks.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks. I got it working with a callback. Here's the code in case anyone else wants to do the same:
Awesome Daniel!
Thank you for this.
I'll make a note of this, and add it to our FAQ section as soon as I have some time on my hands.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables