-
Notifications
You must be signed in to change notification settings - Fork 2
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
Using Painter
API does not fill in configuration defaults correctly
#30
Labels
bug
Something isn't working
Comments
jentfoo
added a commit
that referenced
this issue
Jan 12, 2025
These constructor functions makes it easier to setup defaults, as well as call the specific function needed to build the SeriesList for the struct type. This resolves #30
jentfoo
added a commit
that referenced
this issue
Jan 12, 2025
This also is part of solving #30, this default operation should happen at this common point instead of fillDefaults(). In general fillDefaults() should match what we are doing in our constructor functions added in the prior commit.
jentfoo
added a commit
that referenced
this issue
Jan 12, 2025
This change solves bringing the default functionality more equal with both API's. * Introduced Option struct constructors for each chart type - These constructor functions makes it easier to setup defaults, as well as call the specific function needed to build the SeriesList for the struct type. * Moved chart series and legend setup to `defaultRender` - defaultRender is a common logic point we should use, with fillDefaults being very similar to the constructors introduced above. * defaultRenderOption now has pointers for structs modified in rendering (another place for defaults filled in). This internal API could likely be improved long term, but this is a small change to help ensure logic remains consistent. Overall this change resolves #30
jentfoo
added a commit
that referenced
this issue
Jan 23, 2025
This option allows users to control the space between each bar within a series (and in effect the space between series). In addition a bug was discovered where the Painter API may not correctly scale the chart when Markpoints are used. This bug is another permutation of #30 that was undiscovered, and fixed by moving this logic under `defaultRender`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In a recent commit we added examples using the Painter API. This is an API we want to continue to expand because the direct struct instantiation and use is often simpler. However using these examples we see that the defaults applied in ChartOptions.fillDefaults is not applied to these configuration structs.
In
v0.4.0
we plan to continue to support both of these API's. We should see if we can find a way to make the default behaviors using both API's match. Possibly unifying the code flow further if possible.The text was updated successfully, but these errors were encountered: