admin管理员组文章数量:1403435
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 );
本文标签: How to prevent any aggregation in dimplejs (skip aggregateMethod)Stack Overflow
版权声明:本文标题:How to prevent any aggregation in dimple.js? (skip aggregateMethod) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744420169a2605409.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论