Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Simple Bar chart that has points specified manually
kimgoodman
I have a dataset that looks like this (where column headers are added by me - not in the source data):
| Total | Part1 | Part2 |
| 0.005 | 0.001 | 0.004 |
And want to create a bar Chart like this:
|
| []
| []
| []
| [] []
Part1 Part2
(Hopefully the formatting will come out properly)
How do I achieve this?
Find more posts tagged with
Comments
mwilliams
So, in your dataSet, "Part1" and "Part2" are in different columns and you want to show those in a chart with "Part1" and "Part2" as the category? You say that the column headers are added by you. What are they like in your dataSet? Also, what kind of dataSet are you using? SQL or another type?
kimgoodman
Thanks for your response. The source data I'm using is an XML Data Source with XML data that looks something like this:
<?xml version="1.0"?>
<SimpleData>
<Part1>0.891</Part1>
<Part2>0.045</Part2>
<Combined>0.9108</Combined>
</SimpleData>
And I would like to produce a chart like the one shown in the image I've attached.
Thanks in advance for any help.
mwilliams
Take a look at this report. Be sure to change the location of the XML file, to where you saved it, in the XML dataSource.
What this report does is stores the values of the original dataSet into an array. A field value is also assigned to be used on the x-axis. A text box is bound to the original dataSet so that the onFetch script runs to populate the array. It then uses this array as the dataSource for the scripted dataSet, creating a dataSet with two fields, "Field" i.e. Part1, Part2 and Value. This dataSet is then used for the chart. Hope this helps. This report was created in BIRT 3.7.0.
kimgoodman
That's a clever solution if not slightly convoluted! Thank you for this, I will now have a go at integrating the idea into a much larger report...
Thanks again.
Kim
mwilliams
Let me know if you have any issues, but as you can see, the script is very simple.
Good luck!