@grafana/data#ReduceTransformerOptions TypeScript Examples

The following examples show how to use @grafana/data#ReduceTransformerOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReduceTransformerEditor.tsx    From grafana-chinese with Apache License 2.0 6 votes vote down vote up
ReduceTransformerEditor: React.FC<TransformerUIProps<ReduceTransformerOptions>> = ({
  options,
  onChange,
  input,
}) => {
  return (
    <StatsPicker
      width={25}
      placeholder="Choose Stat"
      allowMultiple
      stats={options.reducers || []}
      onChange={stats => {
        onChange({
          ...options,
          reducers: stats as ReducerID[],
        });
      }}
    />
  );
}
Example #2
Source File: ReduceTransformerEditor.tsx    From grafana-chinese with Apache License 2.0 5 votes vote down vote up
reduceTransformRegistryItem: TransformerUIRegistyItem<ReduceTransformerOptions> = {
  id: DataTransformerID.reduce,
  component: ReduceTransformerEditor,
  transformer: transformersRegistry.get(DataTransformerID.reduce),
  name: 'Reduce',
  description: 'UI for reduce transformation',
}