Skip to content

Commit 295d4a9

Browse files
chore(chart): link labels template sample project
1 parent fe29d36 commit 295d4a9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

components/chart/labels-template-and-format.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ To add a new line, use the `\n` symbol. The other available objects are added th
9090

9191
The general syntax of the templates is based on the [Kendo Templates](https://docs.telerik.com/kendo-ui/framework/templates/overview). Note that the chart labels are not HTML elements and you cannot use HTML in them, only plain strings are allowed. Also, the various helper functions that come from the Kendo jQuery library are not available in Blazor (for example, `kendo.toString()` or `kendo.format()`).
9292

93-
To format the values, you need to call a JavaScript function that will return the desired new string based on the template value you pass to it. You can find an example of this in the [How to format the percent in a label for a pie or donut chart]({%slug chart-format-percent%}) knowledge base article.
93+
To format the values, you need to call a JavaScript function that will return the desired new string based on the template value you pass to it. You can find examples of this in the [How to format the percent in a label for a pie or donut chart]({%slug chart-format-percent%}) knowledge base article and the [Label Format - Complex Logic](https://github.com/telerik/blazor-ui/tree/master/chart/label-template) sample project.
9494

9595
>caption Custom templates in labels
9696

knowledge-base/chart-format-percent.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ To customize the percentage display, you need to
3838
3. Reference that file in your root component (`_Host.cshtml` for a server-side app, or `index.html` for a client-side app).
3939

4040
4. Call the custom formatting function from the template and pass the needed arguments to it. It must return the string you want shown in the template.
41+
42+
43+
>tip You can find a sample project with even more examples in the [https://github.com/telerik/blazor-ui/tree/master/chart/label-template](https://github.com/telerik/blazor-ui/tree/master/chart/label-template) repo.
44+
4145

4246
````Razor
4347
This is only one example, you can implement different functions and logic

0 commit comments

Comments
 (0)