Jump to content
Software FX Community

Two level grouping in Bar chart


Recommended Posts

I have a scenario, wherein I want to draw a bar chart with 2 level grouping. I am getting the data as datatable from database. My actual scenario matches below example.


I have 4 cities.  In the graph I want to display the three month status of each city.

in each month, the city has three status. either it can be in red, green, or yellow with the value as 100%. In similar way I have the data for three months.

This looks like, I have 9 seeries, wherin it will display only three at any given point for one city.

My requirement is to display the city name and month name on X-Axis.
Also the month name should be displayed under correct bar, since the the location of the bar may vary based on the status in that month.
The structure of the table is :
There are nine columns for each city to define the status in three months, since we are having the data as 100% in only three columns any time.  There should be only three legend item, which says the colour.
I managed to create the chart with secondary X-Axis for the city name. However I am having trouble with displaying the  correct tooltip (not able to append the city name). Also it clubs all the three months names while displaying the label in the x-Axis, due to this, the month name is displayed correctly right below the bar.
Any help is highly appreciated.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...