mattosaurus / ChartJSCore

Implementation of Chart.js for use with .NET Core.
GNU General Public License v3.0
116 stars 34 forks source link

Multi-line Labels #66

Closed dissymmetryoflift closed 3 years ago

dissymmetryoflift commented 3 years ago

Is it possible to use the PluginDynamic object to implement multi-line labels?

The ChartJsCore.Models.Data.Labels property is of type IList.

Thanks for this awesome project Matt!

dissymmetryoflift commented 3 years ago

And of course, as soon as I ask a question, I figure it out.

` var labels = new List<List>();

// add a list of strings for each label here

ChartJSCore.Models.Data data = new ChartJSCore.Models.Data(); data.PluginDynamic = new Dictionary<string, object>(); data.PluginDynamic.Add("labels", labels); `