Skip to content
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

Config API updates and improved go docs #5

Merged
merged 1 commit into from
Feb 11, 2024
Merged

Config API updates and improved go docs #5

merged 1 commit into from
Feb 11, 2024

Conversation

jentfoo
Copy link
Member

@jentfoo jentfoo commented Feb 11, 2024

These changes are designed to improve consistency and simplicity of chart configuration.

General Changes

  • Public config struct fields have had their docs updated and improved.
  • Type has been renamed to OutputFormat, this better describes the format that you want the chart rendered to.
  • Heavier theme use - color specifications that were already possible to derive from the theme have been removed, instead the theme is now just always used. As a future change we will allow easier theme modifications to more easily allow one off customization.
  • TrueFlag() and FlaseFlag() have been renamed to just True() and False()
  • NewFloatPoint(float64) has been renamed to FloatPointer
  • Fields with Option in their name have had the Option removed. This makes names more concise, and for YAxisOptions renaming to YAxis made it more consistent when compared to XAxis.

Axis-Specific Changes

  • YAxisOptions field renamed to YAxis as mentioned above.
  • FirstAxis has been renamed to the more descriptive DataStartIndex
  • StrokeColor and SplitLineColor has been removed (as mentioned above, theme is now used). You can use WithAxisColor(Color) to easily change an existing theme to a different axis color. We plan to improve this API further.
  • YAxis Color has been renamed to the more descriptive AxisColor. Depending on how easy we can make theme adjustments this field may be deprecated. It is preferred to modify the theme using WithAxisColor(Color).

Chart-Specific Changes

  • Line charts Opacity has been renamed to the more descriptive FillOpacity (avoid confusion with other shading opacity)
  • For Grid and Table charts Column and Row were made plural into Columns and Rows
  • For Table charts Padding was renamed to the more descriptive CellPadding (avoid confusion with chart padding).

These changes are designed to improve consistency and simplicity of chart configuration.

General Changes

* Public config struct fields have had their docs updated and improved.
* `Type` has been renamed to `OutputFormat`, this better describes the format that you want the chart rendered to.
* Heavier theme use - color specifications that were already possible to derive from the theme have been removed, instead the theme is now just always used. As a future change we will allow easier theme modifications to more easily allow one off customization.
* `TrueFlag()` and `FlaseFlag()` have been renamed to just `True()` and `False()`
* `NewFloatPoint(float64)` has been renamed to `FloatPointer`
* Fields with `Option` in their name have had the `Option` removed. This makes names more concise, and for `YAxisOptions` renaming to `YAxis` made it more consistent when compared to `XAxis`.

Axis-Specific Changes

* YAxisOptions field renamed to `YAxis` as mentioned above.
* `FirstAxis` has been renamed to the more descriptive `DataStartIndex`
* `StrokeColor` and `SplitLineColor` has been removed (as mentioned above, theme is now used). You can use `WithAxisColor(Color)` to easily change an existing theme to a different axis color. We plan to improve this API further.
* YAxis `Color` has been renamed to the more descriptive `AxisColor`. Depending on how easy we can make theme adjustments this field may be deprecated. It is preferred to modify the theme using `WithAxisColor(Color)`.

Chart-Specific Changes

* Line charts `Opacity` has been renamed to the more descriptive `FillOpacity` (avoid confusion with other shading opacity)
* For Grid and Table charts `Column` and `Row` were made plural into `Columns` and `Rows`
* For Table charts `Padding` was renamed to the more descriptive `CellPadding` (avoid confusion with chart padding).
@jentfoo jentfoo self-assigned this Feb 11, 2024
@jentfoo jentfoo merged commit 6b74fa0 into main Feb 11, 2024
5 checks passed
@jentfoo jentfoo deleted the api-updates branch February 11, 2024 19:15
@jentfoo jentfoo added the enhancement New feature or request label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant