-
Notifications
You must be signed in to change notification settings - Fork 7
wcharczuk go‐chart Migration Guide
This guide explains how to migrate from the archived wcharczuk/go-chart project to the current version of go-analyze/charts, using the included chartdraw package.
Users of wcharczuk/go-chart can switch to our project with minimal code changes. The full wcharczuk/go-chart API is available in our chartdraw package.
We have been carefully reviewing wcharczuk/go-chart, adding tests and fixing bugs. API changes have been focused on the root charts package. The chartdraw package has seen minimal changes and will likely remain stable as we expand the charts package. We aim to unify the APIs eventually, but first, we want to fully understand the advantages provided by go-chart.
If you're migrating, we'd love your feedback. Please open an issue to share what you liked about wcharczuk/go-chart, as well as anything you do or do not like about our charts configuration or the styling of our graphs.
-
RendererProviderno longer returns an error. You can now callPNG(int, int)orSVG(int, int)to get aRendererwithout checking for an error. This change introduces no risk of panics or unchecked errors. -
Fontconfiguration is no longer defined by top-level fields inStyle. Instead, you must initialize aFontStylestruct to define font properties (see PR #15). -
drawing.ColorFromRGBhas been removed. Usedrawing.ColorFromRGBAto parse both RGB and RGBA color strings. For more flexibility,charts.ParseColoraccepts RGB, RGBA, hex values, and common color names. (See this commit)