Skip to content

v0.6 - Deprecated API removals and feature improvements#119

Open
jentfoo wants to merge 3 commits intomainfrom
v0.6.0-dev
Open

v0.6 - Deprecated API removals and feature improvements#119
jentfoo wants to merge 3 commits intomainfrom
v0.6.0-dev

Conversation

@jentfoo
Copy link
Member

@jentfoo jentfoo commented Mar 12, 2026

This PR stages the changes for our next API update. Included in this version:

  • Minimum go version updated to 1.23 (enables internal improvements and github.com/golang/image@v0.30.0 update)
  • Font field at the root chart options are removed, instead set the Font on either 1) as the default (SetDefaultFont) 2) On the Painter or 3) in the specific FontStyle fields
  • ValueFormatter on chart options removed, instead set on the series SeriesList[*].Label.ValueFormatter
  • ChartOption.BarHeight and BarWidth were replaced with the single BarSize field
  • FormatTemplate was replaced with the formatting function LabelFormatter
  • YAxisOption.Formatter replaced with formatting function ValueFormatter
  • XAxisOption.FontStyle and YAxisOption.FontStyle use the more specific named LabelFontStyle now
  • TrendLine.Window renamed to the more accurate Period
  • Constant SeriesTrendTypeAverage rename to SeriesTrendTypeSMA
  • chartdraw Default fields which are expected to only be used internally have been removed (open an issue if you found any of these useful)

Still to be included in release:

@jentfoo jentfoo added this to the v0.6.0 milestone Mar 12, 2026
@jentfoo jentfoo self-assigned this Mar 12, 2026
jentfoo added 3 commits March 11, 2026 22:44
This removes several categories of deprecations from `chartdraw` and `drawing`:
* Constants which are expected to only have internal meaning
* Functions which already have direct replacements
* roboto font constant (only referenced through GetFont now)
This change updates our go version enabling:
* No longer a need for min / max helpers (can use builtin min / max instead)
* `slices` package support
* Expanded `strings` support
* github.com/golang/image@v0.30.0 update (newest version for go 1.23)

Overall this provides significant advantages to our library, while still offering an old enough go version to allow easy adoption.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant