|
|
Re: How to design a bubble chart [message #1143045 is a reply to message #1142127] |
Fri, 18 October 2013 01:19 |
|
Sorry for the delay. What you'll need to do is go to the select data tab of the chart editor, select the sorting and grouping button next to the x-axis field, and deselect grouping. Next, you need to go to the format chart tab and choose the x-axis category on the left side, then deselect the is category axis check box. That should do it.
Michael
Developer Evangelist, Silanis
|
|
|
|
|
|
Re: How to design a bubble chart [message #1701774 is a reply to message #1701612] |
Wed, 15 July 2015 14:02 |
donino donino Messages: 183 Registered: July 2011 |
Senior Member |
|
|
I had a look at the report-design of the sample mentionned above. First a comma-separated list of labels is built in a global variable, using the onCreate script of a hidden table:
if (countries == ""){
countries = row["countryID"];
}
else{
countries+=","+row["countryID"]
}
This global var is stored in a persistent variable, so that it can be accessed in chart scripts.
Then, in "beforeDrawDataPointLabel" event of the chart we update labels using this comma-separated list. "countries" and "nameIDX" are initialized at the beginning of "onRender" script of the chart.
nameIDX=0;
countries=null;
function beforeDrawDataPointLabel( dph, label, icsc )
{
if (countries==null){
countries = icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("countries");
countries = countries.split(",");
}
label.getCaption().setValue(countries[nameIDX]);
nameIDX++;
}
BTW, it was necessary to use a square root function on values to get a correct bubble sizing. In the "size" property of the chart:
Math.sqrt(row["value1"]);
This example is available here.
[Updated on: Thu, 16 July 2015 06:20] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03457 seconds