I cannot find documentation for executeAfm params,...
# gooddata-ui
m
I cannot find documentation for executeAfm params, especially the ids. how do I translate this <PivotTable measures={[modifyMeasure(Md.Rental.Avg, (m) => m.title("Offers"))]} rows={[modifyAttribute(Md.VersionStd, (m) => m.alias("Vehicle"))]} columns={[Md.CustId]} filters={[filterMthCode, filterMake, filterModel]} config={{ columnSizing: { defaultWidth: "autoresizeAll", growToFit: true, ], }} /> into const execution = { execution: { afm: { measures: [ { localIdentifier: "fact.re_it_rentals.rental", definition: { measure: { item: { identifier: "fact.re_it_rentals.rental", }, }, }, }, ], }, resultSpec: { dimensions: [ { itemIdentifiers: ["attr.re_it_rentals.version_std"], }, ], }, }, }; sdk.execution .getExecutionResponse(workspaceId, execution) .then((executionResponse) => { console.log(executionResponse); }); (edited)
j
Please read through https://community.gooddata.com/gooddata-ui-kb-articles-48/gooddata-ui-custom-visualizations-428 on how to use raw JavaScript Promises to obtain execution results. There's also this university tutorial that walks you through this topic.
m
Super helpful, thanks @Jiri Zajic I ended up writing a custom visualisation with useExecutionDataView so I can manipulate further the data before passing the charts. Amazing. For reference: https://gdui-examples.herokuapp.com/execute
👍 1
j
Great, love to hear that! Let us know if you need anything 🙂
m
The gdui chart default components are build with recharts or highcharts?
j
Most GD.UI charts are built with Highcharts (ColumnChart, BarChart, …), the PivotTable is built with ag-grid, Headlines are our custom HTML/CSS, and for geocharts we use Mapbox.
m
Nice, thanks. I'll use Highcharts then. Recharts gets close to bar charts but not the rest,