billboard.js icon indicating copy to clipboard operation
billboard.js copied to clipboard

axis.max() / axis.min() / axis.range() not working on Radars

Open Meffesino opened this issue 1 year ago • 3 comments

Description

I have a Radar chart. Once I use chart.load() to update the data, the Y-max is not updating accordingly and remains the same, as for the generation of the chart. Neither can I change the y max via any of those api calls:

axis.max() / axis.min() / axis.range()

Steps to check or reproduce

CodePen - Fiddle Example

  1. Click on "Add more Data" and you'll see, that the new dataset is loaded correctly, but the Y axis is not automatically changing, which results, that the data set is over-extending the original chart size. Neither does the chart.axis.max() call does change anything on the scale of the radar chart. How do I change the y max on radars? Expected output:
  • Y max should be recalculated on chart.load()
  • Y max should be changeable via axis.max() call

Changing type: "radar" to type: "line" and everything is working as expected...

Meffesino avatar Aug 16 '23 01:08 Meffesino

Hi @Meffesino, there are no concept of x/y axes for radar type chart. Hence, axis' methods only works for chart types which appears x/y axes.

netil avatar Aug 16 '23 05:08 netil

Hi @netil - maybe it is not using the concept of "Axis" - but there has to be any concept to define what the maximum range of the radar is and how to present the data set inside that radar. Especially as I can load() new data and it presenting the data correctly to the existing range. It is computed somehow while generating the radar. As axis concept is used and can be manipulated at lines / bar etc. I have expected, that this is also the case for radars.

Meffesino avatar Aug 16 '23 08:08 Meffesino

here has to be any concept to define what the maximum range of the radar

you can use radar.axis.max option to define axis' max range, but when isn't specified it will be set max value according the data bound.

When data is dynamically loaded, won't reflect newly added data's range and this need to be improved in future release.

netil avatar Aug 18 '23 08:08 netil