@splunk/async-dynamic-options-evaluator
v27.0.0
Published
### AsyncDynamicOptionsEvaluator
Downloads
3,222
Maintainers
Keywords
Readme
@splunk/async-dynamic-options-evaluator
AsyncDynamicOptionsEvaluator
A package that utilizes Web Workers to offload the work done within @splunk/visualization-encoding Options.evaluate to a seperate thread.
Input Parameters
- visualizationID
- props
- options
- dataSources
- theme
Output
- Promise that resolves and returns evaluated dynamic options
Example Usage
// WIP
AsyncDynamicOptionsEvaluator.evaluate({
visualizationID: 'test-id',
props: {},
options: {},
dataSources: {},
theme: { background: () => '#ffffff' },
}).then(results => {
/**
results.results is the same as the return value from
@splunk/visualization-encoding/Options.evaluate(
{
context: defaultsDeep({}, context, vizConfig.defaultContext),
options: deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions),
},
dataSources,
themeFunc
);
*/
});