echarts-stat
echarts-stat copied to clipboard
Expose options for bin width and bin count in histogram function
The methods available in the histogram function work for many cases, but not all. It would be helpful to be able to pass in a bin width or bin count to override the result of the bin calc function:
ecStat.histogram(data, binWidth=50)
// OR
ecStat.histogram(data, binCount=10)
// OR
ecStat.histogram(data, method='freedmanDiaconis')
This would allow a lot more flexibility in how to use the histogram function (e.g., you could add a slider component to a histogram chart to let a user play around with the bin count or width on a page).