
[
{"name":"Label 1","size":850.84, "color":50.7, "xvalue":100},
{"name":"Label 2","size":3308.76, "color":10, "xvalue":20.5}
]
| setTitle(text: string): void | Set title of the chart. |
| setTitleVisible(flag: boolean): void | Show / hide the title of the chart. |
| setAvgVisible(flag: boolean): void | Show / hide the average line in the chart. |
| setStartColor(color: string): void | Set the start color of the color scale. |
| setEndColor(color: string): void | Set the end color of the color scale. |
| setXAxisLabel(text: string): void | Set the name to be used for the measure plotted on x-axis of the chart. |
| setSizeAxisLabel(text: string): void | Set the name to be used for the measure represented by size of the bubble. |
| setColorAxisLabel(text: string): void | Set the name to be used for the measure represented by color of the bubble. |
| setValueDecimal(value: integer): void | Set the decimal places to display for the measure plotted on x-axis of the chart. |
| setSizeValueDecimal(value: integer): void | Set the decimal places to display for the measure represented by size of the bubble. |
| setColorValueDecimal(value: integer): void | Set the decimal places to display for the measure represented by color of the bubble. |
| setData(jsonData: string): void | Set the data to be plotted in the chart. The data to be passed as a string in following JSON format: [ {"name":"Label 1", "size":850.84, "color":50.7, "xvalue":100}, {"name":"Label 2", "size":3308.76, "color":10, "xvalue":20.5} ] |
| getSelectedLabel(): string | Returns the label of the selected bubble when a bubble is clicked. When de-selected, this method returns undefined. |
| getSelectedXValue(): number | Returns the x-axis value of the selected bubble when a bubble is clicked. When de-selected, this method returns undefined. |
| getSelectedSizeValue(): number | Returns the size-axis value of the selected bubble when a bubble is clicked. When de-selected, this method returns undefined. |
| getSelectedColorValue(): number | Returns the color-axis value of the selected bubble when a bubble is clicked. When de-selected, this method returns undefined. |
var DS_1 = Table_1.getDataSource();
var dimList = DS_1.getMembers("Product",100);
var json = "";
for(var i = 0; i < dimList.length; i++){
var label = '"name":"'+dimList[i].id+'"';
var value = DS_1.getData({
"@MeasureDimension":"[Account].[parentId].&[Sales_Value]",
"Product":dimList[i].id
});
var svalue = DS_1.getData({
"@MeasureDimension":"[Account].[parentId].&[Units_Sold]",
"Product":dimList[i].id
});
var cvalue = DS_1.getData({
"@MeasureDimension":"[Account].[parentId].&[Discount]",
"Product":dimList[i].id
});
var val='';
var sval='';
var cval='';
if(value === undefined || svalue === undefined || cvalue === undefined){
// Do nothing
}else{
val = value.rawValue;
sval = svalue.rawValue;
cval = cvalue.rawValue;
json = json + "{" + label + "," + '"xvalue":' + val + ","+'"size":' + sval +',"color":'+cval+"},";
}
}
json = "[" + json.substring(0,json.length-1) + "]";
return json;FBUBBLE_1.setData(ScriptObject_1.createJSONData());Table_1.setVisible(false);You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 26 | |
| 26 | |
| 21 | |
| 21 | |
| 19 | |
| 14 | |
| 14 | |
| 14 | |
| 14 | |
| 10 |