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

tickPlacement: 'between' caused chart to crash #4705

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

rosco54
Copy link
Contributor

@rosco54 rosco54 commented Sep 15, 2024

Issue 4704

gl.seriesX[0].length() was effectively used to size a number of temporary arrays in Scales.scaleMultipleYAxes() but it appears that gl.seriesX is not populated if tickPlacement: 'between' is configured, so this initialization now uses gl.datapoints instead.

Duplicate function

Removed a duplicate version of a function that was left behind during previous refactoring:

Scales.setSeriesYAxisMappings()
CoreUtils.setSeriesYAxisMappings()

Both were identical except for a loop at the end of CoreUtils.setSeriesYAxisMappings() which set default series group names. Therefore removing Scales.setSeriesYAxisMappings() and substituting the call to it should have no net effect. This appears to be the case from testing.

Fixes #4704
Fixes #4699

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • My branch is up to date with any changes from the main branch

gl.seriesX[0].length() was effectively used to size a number of
temporary arrays in Scales.scaleMultipleYAxes() but it appears that
gl.seriesX is not populated if tickPlacement: 'between' is configured,
so this initialization now uses gl.datapoints instead.

Removed a duplicate version of a function that was left behind during
previous refactoring:
Scales.setSeriesYAxisMappings()
CoreUtils.setSeriesYAxisMappings()
Both were identical except for a loop at the end of
CoreUtils.setSeriesYAxisMappings() which set default series group
names. Therefore removing Scales.setSeriesYAxisMappings() and
substituting the call to it should have no net effect. This appears to
be the case from testing.
@rosco54 rosco54 marked this pull request as ready for review September 15, 2024 10:19
@junedchhipa junedchhipa merged commit 8362e84 into apexcharts:main Sep 15, 2024
7 checks passed
@rosco54 rosco54 deleted the Issue_4704 branch September 16, 2024 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TickPlacement 'between' crashes stacked category chart Column/Bar type Chart crashes in stacked mode
2 participants