Hi,
There is an example in your documentation with the following code:
onPositionChange: function(event:any, args:any){
if(args.origin !== "data" && args.origin !== "api") { // only ‘user’ initiated events, please
self.change.emit(args);
}
},
onChartUpdate: function(event:any, args:any){
if(args.origin !== "data" && args.origin !== "api") { // only ‘user’ initiated events, please
self.change.emit(args);
}
}
It works only if data are taken from a JSON file like in the example.
If we use a custom dataFunction to provide a dynamic data source like:
data:
{
timestampInSeconds: false,
units: ["y", "M", "d", "h", "m"],
dataFunction: function (from: number, to: number, unit: string, success: any, error: any) {
let e = new LoadEvent();
e.from = from;
e.to = to;
e.unit = unit;
e.success = success;
e.error = error;
self.load.emit(e);
}
},
when a user changes a time period or a zoom level in most events a origin is "api" and filtered out.
Is it a bug or we are doing something wrong?