models.gen.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. // NOTE: This file will be auto generated from models.cue
  3. // It is currenty hand written but will serve as the target for cuetsy
  4. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. import {
  6. LegendDisplayMode,
  7. OptionsWithLegend,
  8. OptionsWithTooltip,
  9. TooltipDisplayMode,
  10. GraphGradientMode,
  11. HideableFieldConfig,
  12. SortOrder,
  13. } from '@grafana/schema';
  14. export const modelVersion = Object.freeze([1, 0]);
  15. export interface PanelOptions extends OptionsWithLegend, OptionsWithTooltip {
  16. bucketSize?: number;
  17. bucketOffset?: number;
  18. combine?: boolean;
  19. }
  20. export const defaultPanelOptions: PanelOptions = {
  21. bucketOffset: 0,
  22. legend: {
  23. displayMode: LegendDisplayMode.List,
  24. placement: 'bottom',
  25. calcs: [],
  26. },
  27. tooltip: {
  28. mode: TooltipDisplayMode.Multi,
  29. sort: SortOrder.None,
  30. },
  31. };
  32. /**
  33. * @alpha
  34. */
  35. export interface PanelFieldConfig extends HideableFieldConfig {
  36. lineWidth?: number; // 0
  37. fillOpacity?: number; // 100
  38. gradientMode?: GraphGradientMode;
  39. }
  40. /**
  41. * @alpha
  42. */
  43. export const defaultPanelFieldConfig: PanelFieldConfig = {
  44. lineWidth: 1,
  45. fillOpacity: 80,
  46. //gradientMode: GraphGradientMode.None,
  47. };