mariusmuntean / ChartJs.Blazor

Brings Chart.js charts to Blazor
https://www.iheartblazor.com/
MIT License
677 stars 151 forks source link

Data labels over data point #79

Closed DavidStania closed 4 years ago

DavidStania commented 4 years ago

Describe your question

Hey Guys, can anyone describe how to show labels over or inside data points? Sometimes it is very usefull to know witch exacly value datapoint has, without moving cursor hover for showing tooltip.

Which Blazor project type is your question related to?

Which charts is this question related to?

all charts

Joelius300 commented 4 years ago

Thanks for the issue.

I think for that you need the datalabels-plugin. As far as I understand you don't have to configure/change anything in this library for the plugin to work, just take a look at the getting-started page.

Sometime in the future there will be an easy way to add plugins in this library and also a way to extend the classes with custom fields so you could add whatever you want if you need it (for example when you're using a plugin).

I'll close this issue for now. If this isn't enough information or you know what needs to be done for this then feel free to reopen.

Joelius300 commented 4 years ago

FYI If you have setup the plugin, you can configure it with this library from now on (see #91). This change is not included in the latest nuget release (1.1.0) but will be published in the future.

For the configuration on chart level you can use the Options.Plugins property but since this plugin also allows dataset level configurations, you will need to subclass the dataset you're using and adding the plugin option there too.