This is a migrated thread and some comments may be shown as answers.

Animate Bubble Chart with data change

2 Answers 98 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Matthias
Top achievements
Rank 1
Matthias asked on 07 Oct 2013, 01:43 PM

Is it possible to animate the bubbles when the data changes?  I mean that the attributes (x,y,size,color) transition from the current to the new.

(Syntax includes TypeScript)

var opt: kendo.dataviz.ui.ChartOptions = {};
opt.title = { text: 'Plot' };
opt.transitions = true;
opt.dataSource = this.dataSource;
opt.series = [{ type: 'bubble', yField: 'price', xField: 'time', sizeField: 'size', categoryField: 'id' }];//, overlay: { gradient:'glass'} }]; // colorField
opt.xAxis = [{ title: { text: 'Time' }, crosshair: { visible: true, tooltop: { visible: true, format: "n0" } } }];
opt.yAxis = [{ title: { text: 'Change' }, crosshair: { visible: true, tooltop: { visible: true, format: "n0" } } }];
opt.tooltip = { visible : true, format : "{3}", opacity : 1 };

////////////////////////////////////////////////////////////////////////////////
public mergeDataArray( items : Array<any> ) : void
{
//this.dataSource.data(item);
var item : any;
var src: any;
var i : number;
var j : number;
var n : number = this.dataSource.total();
var nout : number = items.length;
var found: boolean;

console.log('outter ' + nout + ' ' + n );
for(j = 0; j < nout; j++)
{
src = items[j];
found = false;
//console.log('outter ' + src['id']);
for(i = 0; i < n; i++)
{
item = this.dataSource.at(i);
if( src.id == item.id )
{
item.set('price', src.price);
item.set('time', src.time);
found = true;
break;
}
} // endfor

if(!found)
{
// add in new item
}
} // endfor
//this.dataSource.sync();
console.log('changed ' + this.dataSource.hasChanges() );
}

The data source does see that the data has changed, but it just does a quick set with no transition/animation from current condition to the new condition.

2 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 09 Oct 2013, 11:37 AM
Hi,

Animated transitions are not currently supported by the bubble chart.

Our long-term plans already include enhancing the animations, but please do vote for this feature on our UserVoice portal.

Regards,
T. Tsonev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sam
Top achievements
Rank 2
answered on 13 Apr 2018, 07:51 AM
http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/9655854-animation-when-changing-values
Tags
Charts
Asked by
Matthias
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Sam
Top achievements
Rank 2
Share this question
or