jQuery UI Widgets › Forums › Chart › bubble chart showing different bubble for same value
Tagged: chart, formatFunction, jqxChart, labels, maxRadius, minRadius, radiusDataField
This topic contains 1 reply, has 2 voices, and was last updated by Nadezhda 10 years, 1 month ago.
-
Author
-
I am using bubble sample from demo. I have changed data like this: same data for YoYGrowthQ1=4 and YoYGrowthQ2=4 for New York
var sampleData = [
{ City: ‘New York’, SalesQ1: 310500, SalesQ2: 210500, YoYGrowthQ1:4, YoYGrowthQ2: 4 },
{ City: ‘London’, SalesQ1: 310500, SalesQ2: 169000, YoYGrowthQ1:5, YoYGrowthQ2: 5 },
{ City: ‘Paris’, SalesQ1: 310500, SalesQ2: 275500, YoYGrowthQ1:6, YoYGrowthQ2: 1 },
{ City: ‘Tokyo’, SalesQ1: 187000, SalesQ2: 130100, YoYGrowthQ1: 12, YoYGrowthQ2: 12 },
{ City: ‘Berlin’, SalesQ1: 187000, SalesQ2: 113000, YoYGrowthQ1: 10, YoYGrowthQ2: 10 },
{ City: ‘San Francisco’, SalesQ1: 142000, SalesQ2: 102000, YoYGrowthQ1: 7, YoYGrowthQ2: 7 },
{ City: ‘Chicago’, SalesQ1: 171000, SalesQ2: 124000, YoYGrowthQ1: 5, YoYGrowthQ2: 5 }
];
and using same minRadius and maxRadius for both datafields
series: [
{
dataField: ‘SalesQ1’, radiusDataField: ‘YoYGrowthQ1’, minRadius: 1, maxRadius: 15, displayText: ‘Sales in Q1’,
labels: {
visible: true, offset: { x: 0, y: -20 },
verticalAlignment: ‘top’
},
formatFunction: function (value, itemIndex) {
console.log(dataAdapter.records);
var YoYGrowth1 = dataAdapter.records[itemIndex].YoYGrowthQ1;
return YoYGrowth1;
}
},
{
dataField: ‘SalesQ2’, radiusDataField: ‘YoYGrowthQ2’, minRadius: 1, maxRadius: 15, displayText: ‘Sales in Q2’,
labels: {
visible: true, offset: { x: 0, y: -20 },
verticalAlignment: ‘top’
},
formatFunction: function (value, itemIndex) {var YoYGrowthQ2 = dataAdapter.records[itemIndex].YoYGrowthQ2;
console.log(YoYGrowthQ2);
return YoYGrowthQ2;
}
}
]
New York has different bubble size for same data=4. This is because Paris YoYGrowthQ2: 1, and first serie does not have value 1.
If I changed Paris YoYGrowthQ2 for anything bigger then 4, then New York bubbles are same size.Hello arkgroup,
Please, find the following post which contains more information about this issue: http://www.jqwidgets.com/community/topic/how-to-show-labels-in-bubble-chart/#post-67784.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.