-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement aggregate transformer #15306
Comments
Would be great to have this feature 💯 |
@100pah Seems like a pretty useful feature |
This feature seems really helpful. 👍 |
Yes, this feature is very helpful. Would be great to have this feature. |
It is a very great feature. It would be very helpful to have this feature. |
Any update on merging this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At present the there is only a simplest aggregate transformer in echarts-simple-transform/aggregate. We should better implement a built-in aggregate transformer in echarts.
About the API
Think of whether the API of echarts-simple-transform/aggregate appropriate.
About group by
In echarts-simple-transform/aggregate only on dimension can be set in group by. Do we need to support multiple dimension group by?
About Methods
Some
methods
of aggregate already roughly implemented in echarts-simple-transform/aggregate:sum
count
first
average
Q1
Q2
/median
Q3
min
max
We need to make sure they are implemented correctly.
Other methods we may implement:
distinct
: The count of distinct dimension values.variance
: The sample variance of dimension values.variancep
: The population variance of dimension values.stdev
: The sample standard deviation of dimension values.stdevp
: The population standard deviation of dimension values.stderr
: The standard error of dimension values.product
: The product of dimension values.valid
: The count of dimension values that are notnull
,undefined
,''
,NaN
,'-'
, or determined by user defined validation function.Some references: vega aggregate.
About math calculation precision
We all known that the floating precision issue (like
0.1 + 0.2
). It might bring trouble in some scenarios like:Some cases:
We should also take care the
toFixed bug
like:Solution:
multipleSafe
in appropriate place.See: IEEE 754, http://0.30000000000000004.com/, camsong/blog#9, https://javascript.info/number#imprecise-calculations, ... (lots of related references)
Some library:
About big number
Do not support.
Test
Could find some test cases in some other math libraries.
The text was updated successfully, but these errors were encountered: