I have a dimple.js line plot that plots a serie of cumulated values over time, using addTimeAxis
on x and addMeasureAxis
on y.
There is one value per day, except for the current day, where there are two values that I want to keep as distinct data points: booked and forecasted (e.g. precipitations or else), a vertical line having to be traced between these two values.
Dimple aggregates the values using aggregateMethod, whose default mode is "sum". .aggregateMethod
In my case, this has the effect of merging the to data points (booked / forecasted) into a unique data point. For instance, if the booked cumulated amount is 1250
and the forecasted cumulated amount at the end of the day is 1350
, instead of keeping the two data points, it creates one at unique point at the height of 2600
(the sum of 1250 and 1350).
The issue, that I illustrated in this post, revealed specific to dimple aggregating data points.
I want to either avoid any call aggregateMethod for this plot, or create a "void" aggregateMethod that I would set as aggregateMethod.none
. To keep the two data points distinct at same x value (i.e. date) am not sure if I have to create a new blank/void aggregateMethod mode in dimple.js, and even if I have to prevent aggregation somewhere else.
Unsucessfully attempted:
Setting aggregateMethod to "count" mode:
lineplot_resultat_cumule.series[0].aggregate = dimple.aggregateMethod.count;
simply counts the number of records, for each x value, i.e. in my case the number of records per day (1 or 2).Commenting out
dimple.aggregateMethod.sum
andplotFunction.stacked
around line 1565 of dimple.js:// Create a series object series = new dimple.series( this, categoryFields, xAxis, yAxis, zAxis, colorAxis, pieAxis, plotFunction, //dimple.aggregateMethod.sum, //plotFunction.stacked );
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744420169a4573334.html
评论列表(0条)