Skip to content

Commit

Permalink
[update] info on template for Pie and Donut chart values
Browse files Browse the repository at this point in the history
  • Loading branch information
mafanya23 committed Jul 9, 2024
1 parent fc84a32 commit df8c9a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/chart/api/chart_series_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ series: [
</tr>
<tr>
<td><b>valueTemplate</b></td>
<td>(optional) a function that specifies the template for rendering the calculated percent values for data items on a chart<br/><br><b>Related Sample: </b><a href="https://snippet.dhtmlx.com/77aei7os?tag=chart" target="_blank">Chart. Value template</a> </td>
<td>(optional) a function that specifies the template for rendering the values for data items on a chart<br/><br><b>Related Sample: </b><a href="https://snippet.dhtmlx.com/77aei7os?tag=chart" target="_blank">Chart. Value template</a> </td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions docs/chart/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ const chart = new dhx.Chart("chart_container", {
});
~~~

## Adding template for percent values
## Adding template to values of data items in Pie and Donut charts

![](../assets/chart/show_percent_values.png)

**Related sample**: [Chart. Value template](https://snippet.dhtmlx.com/o7ke2f1s)

When you need to show percent values for data items on the Pie, Pie3D and Donut charts, you can use the **valueTemplate** option of [series](chart/configuration_properties.md#the-list-of-config-options-for-series-for-charts-without-scales-pie-pie3d-donut) to specify the necessary template function. For example:
When you need to show values for data items on the Pie, Pie3D and Donut charts, you can use the **valueTemplate** option of [series](chart/configuration_properties.md#the-list-of-config-options-for-series-for-charts-without-scales-pie-pie3d-donut) to specify the necessary template function. For example:

~~~jsx {6-8}
const chart = new dhx.Chart("chart_container", {
Expand Down
2 changes: 1 addition & 1 deletion docs/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Released on July X, 2024

#### Chart

- The ability to [specify a template for showing percent values for data items on the Pie, Pie3D and Donut charts](chart/customization.md#adding-template-for-percent-values)
- The ability to [specify a template for showing values for data items on the Pie, Pie3D and Donut charts](chart/customization.md#adding-template-for-percent-values)
- The ability to [add the header/footer for an exported PNG file](/chart/api/export/chart_png_method/)

#### Combobox
Expand Down

0 comments on commit df8c9a5

Please sign in to comment.