You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by Gentrit Gruda <ge...@gmail.com> on 2021/10/05 15:06:42 UTC

ECharts Problems

Hello,
hope you are doing well and are safe.
I wanted to ask you about two things:

   1. How can I set 4 Fixed Lines in yAxis? I don't want to set them with
   min/max because if i set min:0 and max:100000 and I have a value with 37 or
   something it doesn't look as it should, is there a way to set a fixed
   amount of 4 Lines in the yAxis but the  yAxis Values to be calculated as
   they are now?
   2. How can I add a sub-legend, for example I have a legend and have some
   categories in the legend like 'developer' but i have a 'web-developer' i
   have a 'mobile-app-developer' etc. How can I add some "+" in the legend
   near 'developer' so when I click the "+" it expands and shows the
   sub-legend and updates the chart with the sub-legend, or shows only the
   sub-legend information in the Chart ?

Would be great if you could respond asap because I'm in hurry to finish
this for my Sprint. I've searched and looked everywhere for a Week straight
now.

I'm looking forward to hearing from you.

Best regards,
Gentrit

Re: ECharts Problems

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

Apache ECharts doesn't provide a simple way to do this job because this may
cause
bad split values in some cases, like when max data is 10 and split into 3
causes labels
to be "3.3333" and "6.6667".

In most cases, we would suggest setting "splitNumber", to be 4 in your
case. But
this serves only as a recommendation and may be adjusted when values on
split
positions are not "nice".

If you wish to force splitting into 4, and know the range of data, you can
set "interval"
to control the span between each axis splitLine.


As about the sub-lenged, ECharts does not support sub-legend. But it does
support
multiple legends which can be defined as "legend: [{...}, {...}]". Each of
the legend
can be set with different positions and data items. You can try with it to
see what can
be done from there.

Thanks

*Ovilia*


On Tue, Oct 5, 2021 at 11:24 PM Gentrit Gruda <ge...@gmail.com> wrote:

> Hello,
> hope you are doing well and are safe.
> I wanted to ask you about two things:
>
>    1. How can I set 4 Fixed Lines in yAxis? I don't want to set them with
>    min/max because if i set min:0 and max:100000 and I have a value with
> 37 or
>    something it doesn't look as it should, is there a way to set a fixed
>    amount of 4 Lines in the yAxis but the  yAxis Values to be calculated as
>    they are now?
>    2. How can I add a sub-legend, for example I have a legend and have some
>    categories in the legend like 'developer' but i have a 'web-developer' i
>    have a 'mobile-app-developer' etc. How can I add some "+" in the legend
>    near 'developer' so when I click the "+" it expands and shows the
>    sub-legend and updates the chart with the sub-legend, or shows only the
>    sub-legend information in the Chart ?
>
> Would be great if you could respond asap because I'm in hurry to finish
> this for my Sprint. I've searched and looked everywhere for a Week straight
> now.
>
> I'm looking forward to hearing from you.
>
> Best regards,
> Gentrit
>

RE: [EXT] ECharts Problems

Posted by Rajmund Witt <rw...@thinkbrg.com.INVALID>.
In regards to point one - assuming you mean an additional line not the axis markers; this could work:

https://echarts.apache.org/en/option.html#series-line.markLine.data

{
        name: 'Horizontal line with Y value at 100',
        yAxis: 100
    },


-----Original Message-----
From: Gentrit Gruda <ge...@gmail.com>
Sent: 05 October 2021 16:07
To: dev@echarts.apache.org
Subject: [EXT] ECharts Problems

⚠ EXTERNAL EMAIL- ThinkTwice


Hello,
hope you are doing well and are safe.
I wanted to ask you about two things:

   1. How can I set 4 Fixed Lines in yAxis? I don't want to set them with
   min/max because if i set min:0 and max:100000 and I have a value with 37 or
   something it doesn't look as it should, is there a way to set a fixed
   amount of 4 Lines in the yAxis but the  yAxis Values to be calculated as
   they are now?
   2. How can I add a sub-legend, for example I have a legend and have some
   categories in the legend like 'developer' but i have a 'web-developer' i
   have a 'mobile-app-developer' etc. How can I add some "+" in the legend
   near 'developer' so when I click the "+" it expands and shows the
   sub-legend and updates the chart with the sub-legend, or shows only the
   sub-legend information in the Chart ?

Would be great if you could respond asap because I'm in hurry to finish this for my Sprint. I've searched and looked everywhere for a Week straight now.

I'm looking forward to hearing from you.

Best regards,
Gentrit
________________________________

BERKELEY RESEARCH GROUP, LLC (TOGETHER WITH ITS AFFILIATES, “BRG”) - NOTICE
THIS EMAIL TRANSMISSION AND ANY ATTACHMENTS HERETO CONTAIN INFORMATION FROM BRG WHICH MAY BE CONFIDENTIAL AND PRIVILEGED. THE INFORMATION IS INTENDED FOR THE SOLE USE OF THE INDIVIDUAL OR ENTITY TO WHOM IT IS ADDRESSED. IF YOU ARE NOT THE INTENDED RECIPIENT, YOUR USE, DISSEMINATION, FORWARDING, PRINTING OR COPYING OF THIS INFORMATION IS PROHIBITED.


TAX ADVICE DISCLOSURE

ANY TAX ADVICE CONTAINED IN THIS COMMUNICATION (INCLUDING ANY ATTACHMENTS) IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, FOR THE PURPOSE OF (I) AVOIDING PENALTIES UNDER THE INTERNAL REVENUE CODE OR (II) PROMOTING, MARKETING OR RECOMMENDING TO ANOTHER PARTY ANY TRANSACTION OR MATTER ADDRESSED HEREIN.

BRG IS (I) NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL ADVICE AND (II) NOT A CPA FIRM AND DOES NOT PROVIDE AUDIT, ATTEST OR PUBLIC ACCOUNTING SERVICES.