You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a good idea, but it shouldn't require the widget to be made stateful as that is usually only necessary when there's state that has to be modified during rendering. I think this can probably be a normal property on the Axis type.
Would you consider raising a PR for this?
I think maybe this would look like:
add a Scale enum with two values: Log, Linear (default value)
add a scale field to the Axis struct and setter methods
adjust the rendering of values and axis
add docs for the new types / functions / values
add unit tests
add log axes to the chart example and reformat the size if needed to make the gif look good
I'm not very familiar with the internals of the library but i can try
No problem - we try to write code in a style that makes it easy for anyone to add features by following the same ideas as what is already there. Keep things consistent with what you see and you'll be mostly ok, and for the rest we can provide feedback that helps guide things in the right direction. Don't hesitate to reach out here or in the feature discussion channel on discord / matrix if needed.
Problem
chart only allows a linear scale for the x and y axes
Solution
make chart a stateful widget so the x and y axes can be changed at runtime from linear to logarithmic
Alternatives
make separate widgets for log scaled charts, but that would lead to having 4 widgets that do very similar things
The text was updated successfully, but these errors were encountered: