Created
September 26, 2023 14:03
-
-
Save westc/ae30175483ab4aa10ceb312b85dda3e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.addSelect({ | |
name: 'Value Field', | |
path: 'valueField', | |
category: ['Display'], | |
description: 'The field containing the values that will be represented by the bars on the bar chart.', | |
settings: { | |
options: [], | |
getOptions(context) { | |
const results = context.data[0]?.fields.map(f => ({value: f.name, label: `${f.name} (${f.type})`})) ?? []; | |
return results as any as Promise<SelectableValue[]>; | |
}, | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment