Hi Community,
Here is the my next work out as an R&D
I'd just want to share the tip on how to convert a stacked bar to stacked+line chart.
The SQL result set is should be as follows to develop the kind of chart shown in image.
city storesales storecost unitsales
Woodland Hills 158.6300 67.6191 63.0000West Covina 152.0900 63.3554 68.0000
Santa Monica 147.0200 55.9771 60.0000
San Gabriel 303.4000 125.9544 128.0000
Pomona 211.9600 83.3137 98.0000
Long Beach 317.8100 127.5116 143.0000
Lakewood 158.5600 64.4194 74.0000
Imperial Beach 118.1100 46.9418 46.0000
Grossmont 164.1700 65.7190 74.0000
Glendale 176.0400 72.6059 87.0000
Downey 211.0500 80.6608 104.0000
Burbank 225.7400 90.0673 109.0000
Beverly Hills 167.8400 67.1768 85.0000
Bellflower 121.5100 49.3005 66.0000
Arcadia 115.3500 44.6145 55.0000
1st column -> X-axis label
2nd column & 3rd columns ->Will sit as sacks
4th column -> coverts to line
Core part :
Set below properties to get the stacked bar with line.
Stacked = True
Crosstab Mode=true
Series in rows =false
Plot2=true
Plot2ArthoAxis=3
Plot2ColorAxis=3
That's it.. Save the dashboard and preview it.
Sample Image 1:
Sample Image 2:
Sample Image 3:
Quickly Want to check it in your environment ???
Click here to download the example
(Jasperserver postgresql foodmart database , bootstrap supported mode with latest C-Tools).
Few limitations on the example:
1) X-axis label font size is not working though given
baseAxisFont = "bold 13px sans-serif"
2) Left side Y-axis & right side Y-axis label colors and font-size is not set .. Need to
find what are the extensions points to use on for them..
Community readers are encouraged to add these points if you find in comments box.
Meet me at sadakar.1988@gmail.com for your business needs ..
No comments:
Post a Comment