2

I'm trying to show only a certain amount of yAxis Lines in my Apache ECharts Chart. I tried the following:

yAxis: [
{
 type: 'value',
 min:0,
 max:6000
}
],
yAxis: [
{
 type: 'value',
 scale:true,
 splitNumber:4,
}
],

I need to dislpay it like this:

How it should look like

For your information: I need this to work on every Chart-Type, Line Chart, Bar Chart etc.

Thanks in advance :)

fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88
gene_g
  • 61
  • 1
  • 4

1 Answers1

3

So, as I have not got any answer. I wanted to share with anyone who might need it in the future, how I solved it. I looked and got the highest number of the data for the current Chart and looked if it is near 1000 I rounded it up to 1000, if it is over 1000 I rounded it up to the nearest 200. For example a number 1059 becomes => 1200 or the number 1215 becomes 1400. Than simply get this Number and divide it by 4(to have 4 Lines). And give this number to the yAxis max. For the min set 0.

gene_g
  • 61
  • 1
  • 4