go-chart icon indicating copy to clipboard operation
go-chart copied to clipboard

Zero data range bar chart now returns custom error

Open rpickz opened this issue 3 years ago • 0 comments

Previously, in the case of no range between the data values for bar charts, fmt.Errorf was called (without format arguments), making the resulting error difficult to compare by downstream users. This has been replaced with a custom error, and its test updated.

The testutil package does not appear to have a function allowing assertion using errors.Is and therefore the errors.Is check is performed in the test itself.

If this assertion would be preferred as an extension of the testutil package, I would be happy to make this change.

rpickz avatar Mar 13 '21 20:03 rpickz