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.getMeasureNameByIndex(rawData: Object, index: Number)
Returns the name of a measure with the specified index from data for the chart. Use amcharts.getMeasureNameByIndex()
to set numeric values for the chart.
Parameter/Type | Description |
---|---|
rawData Object | The raw data that contains the measure name (check out the structure of rawData in getData()). The measures in rawData have the same order as in the slice. |
index Number | The index of the measure to get. |
Returns a string representing the name of a measure with the given index.
1) Setting the valueField
for pie series:
am5percent.PieSeries.new(root, { valueField: pivot.amcharts.getMeasureNameByIndex(rawData, 0), // ... })
See the full code on JSFiddle.
2) Setting the valueYField
for line series:
let series = chart.series.push(am5xy.LineSeries.new(root, { name: pivot.amcharts.getMeasureNameByIndex(rawData, 0), xAxis: xAxis, yAxis: yAxis, valueYField: pivot.amcharts.getMeasureNameByIndex(rawData, 0), valueXField: pivot.amcharts.getCategoryName(rawData), }));
See an example on JSFiddle.
Specifying the amCharts 4 Value axis:
let series = chart.series.push(new am4charts.ColumnSeries()); series.dataFields.valueY = pivot.amcharts.getMeasureNameByIndex(rawData, 0);
Check out an example on JSFiddle.
amcharts.getData
amcharts.getCategoryName
amcharts.getNumberOfMeasures
amcharts.getNumberFormatPattern