setFormat method
Sets a default number format or the number format for the specified measure.
To apply a default format to all measures, leave the measureName
and aggregation
parameters undefined.
To apply a format only to a specific measure, specify the measureName
and aggregation
parameters. Learn more in this guide: Number formatting.
Use refresh()
API call after setting a format to redraw the component and see changes.
Implementation
Future<void> setFormat(dynamic format,
[String? measureName, String? aggregation]) async {
WebViewController apiController = await controller.future;
await apiController
.runJavascript('''flexmonster.setFormat(${jsonEncode(format)}
${measureName == null || aggregation == null ? "" : ",'$measureName','$aggregation'"})''');
}