Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
app
/
plugins
/
panel
/
trend
/
File Content:
module.tsx
import { Field, FieldType, PanelPlugin } from '@grafana/data'; import { commonOptionsBuilder } from '@grafana/ui'; import { defaultGraphConfig, getGraphFieldConfig } from '../timeseries/config'; import { TrendPanel } from './TrendPanel'; import { FieldConfig, Options } from './panelcfg.gen'; import { TrendSuggestionsSupplier } from './suggestions'; export const plugin = new PanelPlugin<Options, FieldConfig>(TrendPanel) .useFieldConfig(getGraphFieldConfig(defaultGraphConfig, false)) .setPanelOptions((builder) => { const category = ['X Axis']; builder.addFieldNamePicker({ path: 'xField', name: 'X Field', description: 'An increasing numeric value', category, defaultValue: undefined, settings: { isClearable: true, placeholderText: 'First numeric value', filter: (field: Field) => field.type === FieldType.number, }, }); commonOptionsBuilder.addTooltipOptions(builder, false, true); commonOptionsBuilder.addLegendOptions(builder); }) .setSuggestionsSupplier(new TrendSuggestionsSupplier()); //.setDataSupport({ annotations: true, alertStates: true });
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
img
---
0755
TrendPanel.tsx
5762 bytes
0644
module.tsx
1155 bytes
0644
panelcfg.cue
1142 bytes
0644
panelcfg.gen.ts
611 bytes
0644
plugin.json
326 bytes
0644
suggestions.ts
1289 bytes
0644
N4ST4R_ID | Naxtarrr