Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Category pie chart
robssl
Hi, I need your help. I think it's easy but I can not find it.
I have a pie chart and in the category come from a xml values??: 1, 2, 3, 4 .....
And I want to map this value to a text:
If the value is 1 then "Text 1"
If the value is 2 then "Text 2" ....
and this text I want to appear on the chart.
The tables have been "Map" to relate a value with a text, but does not work in the chart.
Attach one example
Find more posts tagged with
Comments
Clement Wong
One option (depending on the size of you XML Data Set) is that you can create a new Computed Column in the Data Set to map your category values to actual text values via Javascript. Then, in the Chart, you can change the Category to group by this new Computed Column.<br />
<br />
For example, the computed column expression may look like:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if (row["id"]==1) {"Text 1";}
else if (row["id"]==2) {"Text 2";}
...
else "Default Text";
</pre>
In the attached design, the new computed column is "NewID".<br />
<br />
The other option involves scripting in the <em class='bbc'>function beforeRendering </em>in the onRender of the Chart, and manipulating the legend directly based on your original values.
robssl
Ok thanks, so I worked even thought the solution would be easier.
Now I have another question, I have a series of chart graphics and I are different depending on the data received and I would like to appear next to the chart table for each data series with the series numbers.
Is that possible?
Clement Wong
<blockquote class='ipsBlockquote' data-author="'robssl'" data-cid="115963" data-time="1365751189" data-date="12 April 2013 - 12:19 AM"><p>
Ok thanks, so I worked even thought the solution would be easier.<br />
Now I have another question, I have a series of chart graphics and I are different depending on the data received and I would like to appear next to the chart table for each data series with the series numbers.<br />
Is that possible?<br /></p></blockquote>
<br />
Sorry, I am not quite sure your what your exact requirement is for your new question. Do you have a sample mock-up of what you would like to see?