You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by Nandha Kumar Velusamy <na...@kore.com> on 2023/05/30 14:03:51 UTC

Required clarifications on using Dataset

Hi Team,

We are seeking support for echart-Dataset. Please find our requirements
below

We have an X axis value of *A, B, C, D, A*.if we use this value in the
Dataset. it aggregates the duplicate values (*A*) so we get only A, B, C, D
(It should be A, B, C, D, *A*).We are getting this issue only by using
Dataset.

Attached sandbox for your reference
https://codesandbox.io/s/dataset-in-object-array-forked-e53vgg?file=/index.js
Codesanbox: In the X axis we have duplicate values of *'Milk Tea' *so the
chart combines these values.

Kindly revert back if you have any clarifications on the above and we look
forward to hearing from you.


Thank you
Nandha kumar V
99420 31076

Re: Required clarifications on using Dataset

Posted by Ovilia <ov...@gmail.com>.
I think the current behavior may not be a bug because the names of each X
values are not expected to be the same.
Do you expect there to be four groups of bars such as Matcha Latte, Milk
Tea, Milk Tea, Walnut Brownie? If so, you should convert the dataset first
to make sure the product names are not the same.

Thanks

*Ovilia*


On Wed, May 31, 2023 at 4:21 PM Nandha Kumar Velusamy <
nandha.velusamy@kore.com> wrote:

> Hi Ovilia
>
> Thank you for your response.
>
> We don't want to use *transform*. Our query is not about the
> aggeragations we want to all the data which we passes to Dataset
>
> Example: In the below image we have a dataset with *X Axis* values as* Matcha
> Latte, Milk Tea, Coffee, Walnut Brownie*. So we got bar charts with *Four
> Bars* (Ref: Image 1). In the same example if we change the X axis values
> as *Matcha Latte, Milk Tea, Milk Tea, Walnut Brownie*. Now the X axis
> length is the same as *Four *but it displays only *Three bars*. (Ref:
> Image 2)
>
> Image 1:
> [image: image.png]
>
> Image 2:
> [image: image.png]
>
>
>
> On Wed, May 31, 2023 at 12:06 PM Ovilia <ov...@gmail.com> wrote:
>
>> Hi,
>>
>> Apache ECharts doesn't aggregate data by default. You can make a
>> *transform* [1] in the dataset to do the aggregation.
>>
>> [1] https://echarts.apache.org/en/option.html#dataset.transform-xxx%3Axxx
>>
>> Thanks
>>
>> *Ovilia*
>>
>>
>> On Wed, May 31, 2023 at 2:30 PM Nandha Kumar Velusamy <
>> nandha.velusamy@kore.com> wrote:
>>
>>> Hi Team,
>>>
>>> We are seeking support for echart-Dataset. Please find our requirements
>>> below
>>>
>>> We have an X axis value of *A, B, C, D, A*.if we use this value in the
>>> Dataset. it aggregates the duplicate values (*A*) so we get only A, B,
>>> C, D
>>> (It should be A, B, C, D, *A*).We are getting this issue only by using
>>> Dataset.
>>>
>>> Attached sandbox for your reference
>>>
>>> https://codesandbox.io/s/dataset-in-object-array-forked-e53vgg?file=/index.js
>>> Codesanbox: In the X axis we have duplicate values of *'Milk Tea' *so the
>>> chart combines these values.
>>>
>>> Kindly revert back if you have any clarifications on the above and we
>>> look
>>> forward to hearing from you.
>>>
>>>
>>> Thank you
>>> Nandha kumar V
>>> 99420 31076
>>>
>>

Re: Required clarifications on using Dataset

Posted by Ovilia <ov...@gmail.com>.
Hi,

Apache ECharts doesn't aggregate data by default. You can make a
*transform* [1] in the dataset to do the aggregation.

[1] https://echarts.apache.org/en/option.html#dataset.transform-xxx%3Axxx

Thanks

*Ovilia*


On Wed, May 31, 2023 at 2:30 PM Nandha Kumar Velusamy <
nandha.velusamy@kore.com> wrote:

> Hi Team,
>
> We are seeking support for echart-Dataset. Please find our requirements
> below
>
> We have an X axis value of *A, B, C, D, A*.if we use this value in the
> Dataset. it aggregates the duplicate values (*A*) so we get only A, B, C, D
> (It should be A, B, C, D, *A*).We are getting this issue only by using
> Dataset.
>
> Attached sandbox for your reference
>
> https://codesandbox.io/s/dataset-in-object-array-forked-e53vgg?file=/index.js
> Codesanbox: In the X axis we have duplicate values of *'Milk Tea' *so the
> chart combines these values.
>
> Kindly revert back if you have any clarifications on the above and we look
> forward to hearing from you.
>
>
> Thank you
> Nandha kumar V
> 99420 31076
>