Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rangeArea charts ignore the yaxis tickAmount for the grid generation. #3869

Closed
vLabayen opened this issue Jun 6, 2023 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@vLabayen
Copy link

vLabayen commented Jun 6, 2023

Description

While line charts show as many grid horizontal lines as yaxis ticks, rangeArea charts show a number of grid lines that is not consistent with tickAmount.

Steps to Reproduce

Examples taken from https://apexcharts.com/angular-chart-demos/range-area-charts/basic/.

  1. Set yaxis.tickAmount = 3 in a rangeArea chart (https://codesandbox.io/s/apx-range-area-basic-forked-3pzxf9?file=/src/app/app.component.ts)
  2. Set yaxis.tickAmount = 3 in a line chart (https://codesandbox.io/s/apx-range-area-basic-forked-ihg8to?file=/src/app/app.component.ts)

Expected Behavior

As happens in the line chart, I expect the grid horizontal lines to be equal to the number of ticks in the yaxis.

Actual Behavior

rangeArea charts correctly sets as many labels in the yaxis as yaxis.tickAmount, but the grid lines are not affected.

Screenshots

imagen
imagen

Reproduction Link

RangeArea: https://codesandbox.io/s/apx-range-area-basic-forked-3pzxf9?file=/src/app/app.component.ts
Line (for comparison): https://codesandbox.io/s/apx-range-area-basic-forked-ihg8to?file=/src/app/app.component.ts

Examples given for angular, but reproducible for vanilla js.
Just paste the following js into https://codepen.io/apexcharts/pen/bxzgZJ

var options = {
  chart: {
    height: 380,
    width: "100%",
    type: "rangeArea"
  },
  series: [
    {
      name: "Series 1",
      data: [{x: 1, y: [1,2]}, {x: 2, y: [2, 3]}, {x: 3, y: [2, 3]}, {x: 4, y: [2, 3]}, {x: 5, y: [2, 5]}]
    }
  ],
  yaxis: { tickAmount: 3 }
};

var chart = new ApexCharts(document.querySelector("#chart"), options);

chart.render();
@vLabayen vLabayen added the bug Something isn't working label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant