Hi Rémi,

I'm afraid to can not use a simple option to force using integer values.
But when setting the min value, you can use JavaScript to make it into an
integer (e.g. Math.floor(x * 10) / 10).
If you need more help, please create an online demo based on
https://jsfiddle.net/ovilia/n6xc4df3/ .

Thanks
Wenli


On Tue, Oct 1, 2019 at 9:20 PM Rémi Aubel <remi.au...@gmail.com> wrote:

> Hi,
>
> I would like to configure my Chart's YAxis with these options:
> - a given interval (lets say yAxis.interval = 1)
> - a start value (yAxis.min = 2.7)
> - no max value specified
> and I would like to have only integer values on my axis.
>
> Currently, my YAxis has the values 2.7, 3.7, 4.7...
> I would like 3, 4, 5...
>
> I guess I can have integer values by using yAxis.splitNumber instead of
> yAxis.interval, but to define the appropriate value for splitNumber, I need
> to scan my data to find the max value (then splitNumber would be (max -
> min) / wantedInterval).
>
> Is there any way to configure ECharts to force integer values on the y
> axis?
>
> Best regards,
> Rémi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org
> For additional commands, e-mail: dev-h...@echarts.apache.org
>
>

Reply via email to