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)
Chart Category X-axis as string and sort enabled on numerical value
suresh@anumolu
<p> Hi ,</p>
<p> </p>
<p> I have a line chart plotted with category x-axis as string range. And I have enabled the sorting option on a numerical field value. for some reason X-axis still retains the xml response order. I am expecting 8~9 and 10~11 to be plotted before 16~17.</p>
<p> </p>
<p>Please find the attached rpt design and correspondng xml data. </p>
<p> </p>
<p>I know we can set the X-axis as numeric and have the labels updated in the chart - render method. but before going to that option i would like to see if i am doing any thing wrong with the design. </p>
<p> </p>
<p>thanks for your help in advance.</p>
<p> </p>
<p>Thanks</p>
<p>Suresh</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>One way is to create a data cube from your data set and use the dimensions and measures from the data cube to build the chart.</p>
<p> </p>
<p>In the attached sample, I created a data cube with 2 dimensions, SeriesID and XValRange. Note that the XValRange dimension uses XVal as its key field and XValRange as its Display Field. Also, the data type was manually set to Decimal:</p>
<p>
suresh@anumolu
<p>Thanks Pierre Richer. Your sample works great. But my dataset is very dynamic so it involves scripting to create the cubes dynamic. I will give it a try. </p>
<p> </p>
<p>So interms of sorting option in my original e.g, this is an expected behavior from BIRT(when the x-axis type is set to string type, sorting doesnt get applied on top it) ? </p>
<p> </p>
<p>You have been very help..thanks for your prompt and helpful responses. Much appreciated..</p>
pricher
<p>It's the optional Y-Series grouping (on SeriesID) that screws up the sorting of the X-Axis. It's a known behavior...</p>
<p> </p>
<p>P.</p>
suresh@anumolu
<p>I figured that out after posting my earlier comment..Isn't it supposed to be a bug
.. </p>
<p> </p>
<p>I will have to use the scripting to update the labels then.. thanks for your prompt response.</p>