WebDataRocks End User License Agreement (“Agreement”) has been revised and is effective as of April 18, 2024.
The following modifications have been made:
The modified version of WebDataRocks End User License Agreement is available here.
Downloading, installing, and/or continuing to use WebDataRocks after April 18, 2024, constitutes your acceptance of the terms and conditions of the modified version of WebDataRocks End User License Agreement. If you do not agree to any of these terms and conditions, do not download, install, use, or access (or continue to access) WebDataRocks.
webdatarocks.amcharts.getNumberFormatPattern(format: Object): String
Returns a number formatting string for a chart. Accepts one argument – format which is a Format Object of WebDataRocks.
/* Create a number formatter for the value axis: */ valueAxis.numberFormatter = new am4core.NumberFormatter(); /* Get a format object from WebDataRocks: */ var numberFormat = pivot.amcharts.getNumberFormatPattern(rawData.meta.formats[0]); /* Apply number formatting to the value axis: */ valueAxis.numberFormatter.numberFormat = numberFormat;
Here is an example of how to apply number formatting to the chart’s tooltip text:
var numberFormat = pivot.amcharts.getNumberFormatPattern(rawData.meta.formats[0]); series.columns.template.tooltipText = "{valueY.value.formatNumber('" + numberFormat + "')}";