Skip to content

Ambiguous behavior of the axis labels/ticks calculation procedure #19604

@oleksiy-liulin

Description

@oleksiy-liulin

Expected behaviour

Axis labels and ticks should not change unless the values that affect their calculation (chart size, font size, axis range etc..) remain constant.

For user/programmer it's expected that the tick interval calculation is provided by an internal Highcharts' procedure which gives an unkwonw in advance but the same distance between the ticks. That is, this distance must always be the same no matter in which way the axis is drawn - whether as a result of the initial chart appearance or after its update.
In other words, using the programmer's lexicon - the calculation procedure should be a "pure function" (one that always returns the same result with the same input arguments).

Actual behaviour

Vertical axis labels and ticks changed.

Live demo with steps to reproduce

demo:

  1. Run the demo.
  2. Note the vertical axis labels and ticks. They are 25/50/75
    image
  3. Click the "Update" button to change series color.
  4. Series color is changed from blue to green, but the vertical axis labels and ticks are also changed (recalculated). Now they are 20/40/60
    image

Product version

11.1.0

Affected browser(s)

Chrome 115.0

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions