Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
amcharts.getNumberFormatPattern(format: FormatObject)
Converts the FormatObject to the amCharts number formatting string.
To learn how the number format is set in amCharts, see the Using Flexmonster number formatting in amCharts section.
Parameter/Type | Description |
---|---|
format FormatObject | Contains the number format set in the component. |
This method returns a string representing the amCharts number formatting string. For example: '$'#,###.00|'($'#,###.00')'
.
Applying the formatting to the root element:
root = am5.Root.new("amcharts-container"); root.numberFormatter.set( "numberFormat", pivot.amcharts.getNumberFormatPattern(rawData.meta.formats[0]) );
See a live example on JSFiddle.
Applying the formatting to the chart's Value axis and tooltip:
// Get a FormatObject from Flexmonster let numberFormat = pivot.amcharts .getNumberFormatPattern(rawData.meta.formats[0]); // Applying the formatting to the Value axis valueAxis.numberFormatter = new am4core.NumberFormatter(); valueAxis.numberFormatter.numberFormat = numberFormat; // ... // Applying the formatting to the chart's tooltip series.tooltipText = '{name}: [bold]{valueY.value.formatNumber("' + numberFormat + '")}[/]';
See an example on JSFiddle.
amcharts.getData
amcharts.getCategoryName
amcharts.getMeasureNameByIndex
amcharts.getNumberOfMeasures