Hexastack / eazychart

EazyChart is a reactive chart library 📈, it allows you to easily add SVG charts in your React and Vue web applications.
https://eazychart.com
MIT License
23 stars 14 forks source link

fix: radialchart sorted data #67

Closed yassinedorbozgithub closed 2 years ago

yassinedorbozgithub commented 2 years ago

Motivation

RadialChart is not behaving correctly. The outer circular bar (arc) should display the max value of the data and therefore the bigger arc. This could be resulted from the sortValue function that is not working accordingly. The radial chart is a chart that has circular arcs that are displaying values from a giving column of data. (Description from the issue) This PR fixes this issue.

Fixes #14

Type of change

Please delete options that are not relevant.

Checklist:

IlyesBenAmara commented 2 years ago

:man_technologist:

yassinedorbozgithub commented 2 years ago

Hey @marrouchi The sortValues function will be applied only if arc is undefined and by default arc have {spacing: 0.5} from the storybook. I removed the arc value from the storybook and arc is now null and not undefined. I think this means that the default arc prop config value will never be applied in this case. Maybe if we created a default config variable named arcDefaultConfig and merge it with the arc prop giving priority to the passed arc.

yassinedorbozgithub commented 2 years ago

Hey @marrouchi the required updates for this PR are applied :