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.getNumberOfMeasures(rawData: Object)
Returns the total number of available measures in the slice.
This method can be used to create a chart with multiple series (e.g., the stacked column chart).
Parameter/Type | Description |
---|---|
rawData Object | Raw data containing the measures to count (check out the structure of rawData in getData()). |
Returns a number representing the quantity of measures in the slice.
Using amcharts.getNumberOfMeasures()
to create a stacked column chart:
for (let s = 0; s < pivot.amcharts.getNumberOfMeasures(rawData); s++) { let series = chart.series.push(am5xy.ColumnSeries.new(root, { name: pivot.amcharts.getMeasureNameByIndex(rawData, s), xAxis: xAxis, yAxis: yAxis, stacked: true, valueYField: pivot.amcharts.getMeasureNameByIndex(rawData, s), categoryXField: pivot.amcharts.getCategoryName(rawData), })); series.data.setAll(data); }
See the full code on JSFiddle.
Using amcharts.getNumberOfMeasures()
to create a stacked column chart:
for (let s = 0; s < pivot.amcharts.getNumberOfMeasures(rawData); s++) { let series = chart.series.push(new am4charts.ColumnSeries()); series.dataFields.categoryX = pivot.amcharts.getCategoryName(rawData); series.dataFields.valueY = pivot.amcharts.getMeasureNameByIndex(rawData, s); series.name = pivot.amcharts.getMeasureNameByIndex(rawData, s); series.stacked = true; }
See the full code on JSFiddle.
amcharts.getData
amcharts.getCategoryName
amcharts.getMeasureNameByIndex
amcharts.getNumberFormatPattern