[Question] How to group Bar Chart data?
See original GitHub issueHi I want to achive this kind of chart with 2 datasets
my data look like this
const data1 = [
{label: 'bad', svg: {fill: '#E55300'}, value: 5},
{label: 'marginal', svg: {fill: '#EB742F'}, value: 10},
{label: 'fair', svg: {fill: '#F5A77A'}, value: 20},
{label: 'good', svg: {fill: '#9BD4DE'}, value: 30},
{label: 'satisfactory', svg: {fill: '#1D8091'}, value: 10},
];
const data2 = [
{label: 'bad', svg: {fill: '#E55300'}, value: 10},
{label: 'marginal', svg: {fill: '#EB742F'}, value: 21},
{label: 'fair', svg: {fill: '#F5A77A'}, value: 32},
{label: 'good', svg: {fill: '#9BD4DE'}, value: 44},
{label: 'satisfactory', svg: {fill: '#1D8091'}, value: 75},
];
const data3 = [
{label: 'bad', svg: {fill: '#E55300'}, value: 50},
{label: 'marginal', svg: {fill: '#EB742F'}, value: 81},
{label: 'fair', svg: {fill: '#F5A77A'}, value: 77},
{label: 'good', svg: {fill: '#9BD4DE'}, value: 33},
{label: 'satisfactory', svg: {fill: '#1D8091'}, value: 21},
];
andd i group them like this
const barDataY = [
{
data: data1,
svg: {
stroke: 'red',
strokeWidth: 2,
},
},
{
data: data2,
svg: {
stroke: 'dodgerblue',
strokeWidth: 2,
},
},
{
data: data3,
svg: {
stroke: 'grey',
strokeWidth: 2,
},
},
];
instead getting the chart that i wanted, i got barchart like this i wonder how do i group them by its data set, not by its value?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
A Complete Guide to Grouped Bar Charts | Tutorial by Chartio
A grouped bar chart allows for values to be compared on levels of two different categorical variables. Use this guide to learn how...
Read more >Grouped Bar Chart in Excel - How to Create? (10 Steps)
1. u003cbr/u003eu003cimg alt=u0022Grouped-Bar-Chart-Example-1.0.1u0022 src=u0022https://www.wallstreetmojo.com/wp-content/uploads/2019/08/Grouped-Bar-Chart ... 2. u003cbr/u003eu003cimg alt=u0022Grouped-Bar-Chart-Example-1.0.1.5u0022 src=u0022https://www.wallstreetmojo.com/wp-content/uploads/2019/08/Grouped-Bar-Chart ... 3. u003cbr/u003eu003cimg alt=u0022Grouped-Bar-Chart-Example-1.2.0u0022 src=u0022https://www.wallstreetmojo.com/wp-content/uploads/2019/08/Grouped-Bar-Chart ...
Read more >Creating a Grouped Bar Chart - Excel - eduCBA
Example #1 – Creating Grouped Bar Chart · 1. Select the table and go to the Insert menu, click on Recommended Charts and...
Read more >How do I group different questions onto one bar chart?
Best Answer · Set the X-Axis to your field group · Then setup up your metric using the Top Box / Bottom Box...
Read more >How To Make A Multiple Bar Graph In Excel - YouTube
In this tutorial, I'm going to show you how to easily create a multiple bar graph in Microsoft Excel. A multiple bar graph...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@geovrisco Thanks.
@ashokkumar88 no problem dude, glad that i could help