Closed Davee02 closed 5 years ago
Good idea. I don't think System.Drawing was available for .NET Core when I initially coded this which is why I didn't use it. Do you want to go ahead and submit a pull request with the required changes, or if not I'll look at this when I get a chance.
I just looked at the project and noticed that ChartJSCore targets netstandard2.0. In this framework the System.Drawing
namespace doesn' exist yet.
This means that we cannot use the Color-object (yet).
Each dataset has multiple color-properties (BackgroundColor, ForegroundColor, ...). The datatype of them is
string
. My proposal is that we change the datatype toSystem.Drawing.Color
. The old string value could then be parsed withColor.FromArgb(1, 200, 100, 200)
ornew ColorConverter().ConvertFromString("#FFDFD991")
.The downside of this is that it would be a breaking change. But the migration is fairly simple as shown with the two examples above.
I would be happy if I could implement this.