ngx-echarts icon indicating copy to clipboard operation
ngx-echarts copied to clipboard

BoxPlot - dataTool.prepareBoxplotData is not a function

Open nagug opened this issue 5 years ago • 3 comments

I am trying to plot box chart and in order to prepare data I am tried using the function echarts.dataTool.prepareBoxplotData()

However I am getting the following error ERROR TypeError: echarts.dataTool.prepareBoxplotData is not a function

What is the best way of implementing a boxplot using ngx-echarts?

Angular 6 version.

Thanks and appreciate any input.

nagug avatar Sep 04 '18 22:09 nagug

@nagug

import { prepareBoxplotData } from 'echarts/extension/dataTool';

instead of echarts.dataTool.prepareBoxplotData

xieziyu avatar Sep 06 '18 01:09 xieziyu

Thanks. I was able to get it past that obstacle, however, I still keep getting the TS error. Any suggestions on how to avoid it.

error TS2339: Property 'boxData' does not exist on type 'any[]'.
error TS2339: Property 'outliers' does not exist on type 'any[]'.

Thanks and appreciate any input.

nagug avatar Sep 06 '18 20:09 nagug

I tried using the the following approach and guess its working. Though not sure whether it is the right approach var somedata:prepareBoxplotData = []

nagug avatar Sep 06 '18 20:09 nagug