@perses-dev/components 0.0.0-snapshot-histogram-types-78c5104 → 0.0.0-snapshot-profile-8090608

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +1 -4
  2. package/dist/EChart/EChart.d.ts.map +1 -1
  3. package/dist/EChart/EChart.js +7 -3
  4. package/dist/EChart/EChart.js.map +1 -1
  5. package/dist/TimeChart/TimeChart.d.ts.map +1 -1
  6. package/dist/TimeChart/TimeChart.js +2 -2
  7. package/dist/TimeChart/TimeChart.js.map +1 -1
  8. package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +1 -1
  9. package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -1
  10. package/dist/TimeSeriesTooltip/tooltip-model.d.ts +1 -8
  11. package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
  12. package/dist/TimeSeriesTooltip/tooltip-model.js +6 -16
  13. package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
  14. package/dist/cjs/EChart/EChart.js +5 -1
  15. package/dist/cjs/TimeChart/TimeChart.js +2 -2
  16. package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +6 -25
  17. package/dist/cjs/context/ChartsProvider.js +3 -1
  18. package/dist/cjs/index.js +0 -5
  19. package/dist/cjs/test-utils/theme.js +1 -0
  20. package/dist/context/ChartsProvider.d.ts +2 -0
  21. package/dist/context/ChartsProvider.d.ts.map +1 -1
  22. package/dist/context/ChartsProvider.js +3 -1
  23. package/dist/context/ChartsProvider.js.map +1 -1
  24. package/dist/index.d.ts +0 -5
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +0 -5
  27. package/dist/index.js.map +1 -1
  28. package/dist/test-utils/theme.d.ts.map +1 -1
  29. package/dist/test-utils/theme.js +1 -0
  30. package/dist/test-utils/theme.js.map +1 -1
  31. package/package.json +3 -5
  32. package/dist/BarChart/BarChart.d.ts +0 -16
  33. package/dist/BarChart/BarChart.d.ts.map +0 -1
  34. package/dist/BarChart/BarChart.js +0 -134
  35. package/dist/BarChart/BarChart.js.map +0 -1
  36. package/dist/BarChart/index.d.ts +0 -2
  37. package/dist/BarChart/index.d.ts.map +0 -1
  38. package/dist/BarChart/index.js +0 -15
  39. package/dist/BarChart/index.js.map +0 -1
  40. package/dist/GaugeChart/GaugeChart.d.ts +0 -23
  41. package/dist/GaugeChart/GaugeChart.d.ts.map +0 -1
  42. package/dist/GaugeChart/GaugeChart.js +0 -214
  43. package/dist/GaugeChart/GaugeChart.js.map +0 -1
  44. package/dist/GaugeChart/index.d.ts +0 -2
  45. package/dist/GaugeChart/index.d.ts.map +0 -1
  46. package/dist/GaugeChart/index.js +0 -15
  47. package/dist/GaugeChart/index.js.map +0 -1
  48. package/dist/PieChart/PieChart.d.ts +0 -14
  49. package/dist/PieChart/PieChart.d.ts.map +0 -1
  50. package/dist/PieChart/PieChart.js +0 -92
  51. package/dist/PieChart/PieChart.js.map +0 -1
  52. package/dist/PieChart/index.d.ts +0 -2
  53. package/dist/PieChart/index.d.ts.map +0 -1
  54. package/dist/PieChart/index.js +0 -15
  55. package/dist/PieChart/index.js.map +0 -1
  56. package/dist/StatChart/StatChart.d.ts +0 -21
  57. package/dist/StatChart/StatChart.d.ts.map +0 -1
  58. package/dist/StatChart/StatChart.js +0 -189
  59. package/dist/StatChart/StatChart.js.map +0 -1
  60. package/dist/StatChart/calculateFontSize.d.ts +0 -16
  61. package/dist/StatChart/calculateFontSize.d.ts.map +0 -1
  62. package/dist/StatChart/calculateFontSize.js +0 -49
  63. package/dist/StatChart/calculateFontSize.js.map +0 -1
  64. package/dist/StatChart/index.d.ts +0 -2
  65. package/dist/StatChart/index.d.ts.map +0 -1
  66. package/dist/StatChart/index.js +0 -15
  67. package/dist/StatChart/index.js.map +0 -1
  68. package/dist/StatChart/utils/formatStatChartValue.d.ts +0 -3
  69. package/dist/StatChart/utils/formatStatChartValue.d.ts.map +0 -1
  70. package/dist/StatChart/utils/formatStatChartValue.js +0 -26
  71. package/dist/StatChart/utils/formatStatChartValue.js.map +0 -1
  72. package/dist/StatusHistoryChart/StatusHistoryChart.d.ts +0 -27
  73. package/dist/StatusHistoryChart/StatusHistoryChart.d.ts.map +0 -1
  74. package/dist/StatusHistoryChart/StatusHistoryChart.js +0 -132
  75. package/dist/StatusHistoryChart/StatusHistoryChart.js.map +0 -1
  76. package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts +0 -13
  77. package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts.map +0 -1
  78. package/dist/StatusHistoryChart/StatusHistoryTooltip.js +0 -47
  79. package/dist/StatusHistoryChart/StatusHistoryTooltip.js.map +0 -1
  80. package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts +0 -2
  81. package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts.map +0 -1
  82. package/dist/StatusHistoryChart/get-formatted-axis-label.js +0 -41
  83. package/dist/StatusHistoryChart/get-formatted-axis-label.js.map +0 -1
  84. package/dist/StatusHistoryChart/index.d.ts +0 -3
  85. package/dist/StatusHistoryChart/index.d.ts.map +0 -1
  86. package/dist/StatusHistoryChart/index.js +0 -16
  87. package/dist/StatusHistoryChart/index.js.map +0 -1
  88. package/dist/StatusHistoryChart/utils/get-color.d.ts +0 -6
  89. package/dist/StatusHistoryChart/utils/get-color.d.ts.map +0 -1
  90. package/dist/StatusHistoryChart/utils/get-color.js +0 -100
  91. package/dist/StatusHistoryChart/utils/get-color.js.map +0 -1
  92. package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts +0 -3
  93. package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts.map +0 -1
  94. package/dist/StatusHistoryChart/utils/get-tooltip-position.js +0 -27
  95. package/dist/StatusHistoryChart/utils/get-tooltip-position.js.map +0 -1
  96. package/dist/cjs/BarChart/BarChart.js +0 -142
  97. package/dist/cjs/BarChart/index.js +0 -30
  98. package/dist/cjs/GaugeChart/GaugeChart.js +0 -227
  99. package/dist/cjs/GaugeChart/index.js +0 -30
  100. package/dist/cjs/PieChart/PieChart.js +0 -100
  101. package/dist/cjs/PieChart/index.js +0 -30
  102. package/dist/cjs/StatChart/StatChart.js +0 -202
  103. package/dist/cjs/StatChart/calculateFontSize.js +0 -55
  104. package/dist/cjs/StatChart/index.js +0 -30
  105. package/dist/cjs/StatChart/utils/formatStatChartValue.js +0 -34
  106. package/dist/cjs/StatusHistoryChart/StatusHistoryChart.js +0 -140
  107. package/dist/cjs/StatusHistoryChart/StatusHistoryTooltip.js +0 -55
  108. package/dist/cjs/StatusHistoryChart/get-formatted-axis-label.js +0 -48
  109. package/dist/cjs/StatusHistoryChart/index.js +0 -31
  110. package/dist/cjs/StatusHistoryChart/utils/get-color.js +0 -125
  111. package/dist/cjs/StatusHistoryChart/utils/get-tooltip-position.js +0 -35
package/dist/cjs/index.js CHANGED
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
17
  _export_star(require("./AlignSelector"), exports);
18
- _export_star(require("./BarChart"), exports);
19
18
  _export_star(require("./ColorPicker"), exports);
20
19
  _export_star(require("./ContentWithLegend"), exports);
21
20
  _export_star(require("./controls"), exports);
@@ -28,7 +27,6 @@ _export_star(require("./ErrorAlert"), exports);
28
27
  _export_star(require("./ErrorBoundary"), exports);
29
28
  _export_star(require("./FontSizeSelector"), exports);
30
29
  _export_star(require("./FormEditor"), exports);
31
- _export_star(require("./GaugeChart"), exports);
32
30
  _export_star(require("./InfoTooltip"), exports);
33
31
  _export_star(require("./JSONEditor"), exports);
34
32
  _export_star(require("./Legend"), exports);
@@ -39,7 +37,6 @@ _export_star(require("./OptionsEditorLayout"), exports);
39
37
  _export_star(require("./Overlay"), exports);
40
38
  _export_star(require("./SettingsAutocomplete"), exports);
41
39
  _export_star(require("./SortSelector"), exports);
42
- _export_star(require("./StatChart"), exports);
43
40
  _export_star(require("./Table"), exports);
44
41
  _export_star(require("./ThresholdsEditor"), exports);
45
42
  _export_star(require("./TimeChart"), exports);
@@ -55,8 +52,6 @@ _export_star(require("./test-utils"), exports);
55
52
  _export_star(require("./theme"), exports);
56
53
  _export_star(require("./TransformsEditor"), exports);
57
54
  _export_star(require("./RefreshIntervalPicker"), exports);
58
- _export_star(require("./PieChart"), exports);
59
- _export_star(require("./StatusHistoryChart"), exports);
60
55
  _export_star(require("./ValueMappingEditor"), exports);
61
56
  function _export_star(from, to) {
62
57
  Object.keys(from).forEach(function(k) {
@@ -55,6 +55,7 @@ const testChartsTheme = (0, _utils.generateChartsTheme)((0, _material.createThem
55
55
  const mockChartsContext = {
56
56
  chartsTheme: testChartsTheme,
57
57
  enablePinning: false,
58
+ enableSyncGrouping: true,
58
59
  lastTooltipPinnedCoords: null,
59
60
  setLastTooltipPinnedCoords: ()=>null
60
61
  };
@@ -4,11 +4,13 @@ import { CursorCoordinates } from '../TimeSeriesTooltip';
4
4
  export interface ChartsProviderProps {
5
5
  chartsTheme: PersesChartsTheme;
6
6
  enablePinning?: boolean;
7
+ enableSyncGrouping?: boolean;
7
8
  children?: React.ReactNode;
8
9
  }
9
10
  export interface SharedChartsState {
10
11
  chartsTheme: PersesChartsTheme;
11
12
  enablePinning: boolean;
13
+ enableSyncGrouping: boolean;
12
14
  lastTooltipPinnedCoords: CursorCoordinates | null;
13
15
  setLastTooltipPinnedCoords: (lastTooltipPinnedCoords: CursorCoordinates | null) => void;
14
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ChartsProvider.d.ts","sourceRoot":"","sources":["../../src/context/ChartsProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAAiB,YAAY,EAAiC,MAAM,OAAO,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,iBAAiB,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB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;AAED,eAAO,MAAM,kBAAkB,8CAA0D,CAAC;AAE1F,wBAAgB,gBAAgB,IAAI,iBAAiB,CAMpD;AAED,wBAAgB,cAAc,IAAI,iBAAiB,CAGlD"}
@@ -13,18 +13,20 @@
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import React, { createContext, useContext, useMemo, useState } from 'react';
15
15
  export function ChartsProvider(props) {
16
- const { children, chartsTheme, enablePinning = false } = props;
16
+ const { children, chartsTheme, enablePinning = false, enableSyncGrouping = true } = props;
17
17
  const [lastTooltipPinnedCoords, setLastTooltipPinnedCoords] = useState(null);
18
18
  const ctx = useMemo(()=>{
19
19
  return {
20
20
  chartsTheme,
21
21
  enablePinning,
22
22
  lastTooltipPinnedCoords,
23
+ enableSyncGrouping,
23
24
  setLastTooltipPinnedCoords
24
25
  };
25
26
  }, [
26
27
  chartsTheme,
27
28
  enablePinning,
29
+ enableSyncGrouping,
28
30
  lastTooltipPinnedCoords,
29
31
  setLastTooltipPinnedCoords
30
32
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/context/ChartsProvider.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { createContext, ReactElement, useContext, useMemo, useState } from 'react';\nimport { PersesChartsTheme } from '../model';\nimport { CursorCoordinates } from '../TimeSeriesTooltip';\n\nexport interface ChartsProviderProps {\n chartsTheme: PersesChartsTheme;\n enablePinning?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface SharedChartsState {\n chartsTheme: PersesChartsTheme;\n enablePinning: boolean;\n lastTooltipPinnedCoords: CursorCoordinates | null;\n setLastTooltipPinnedCoords: (lastTooltipPinnedCoords: CursorCoordinates | null) => void;\n}\n\nexport function ChartsProvider(props: ChartsProviderProps): ReactElement {\n const { children, chartsTheme, enablePinning = false } = props;\n\n const [lastTooltipPinnedCoords, setLastTooltipPinnedCoords] = useState<CursorCoordinates | null>(null);\n\n const ctx = useMemo(() => {\n return {\n chartsTheme,\n enablePinning,\n lastTooltipPinnedCoords,\n setLastTooltipPinnedCoords,\n };\n }, [chartsTheme, enablePinning, lastTooltipPinnedCoords, setLastTooltipPinnedCoords]);\n\n return <ChartsThemeContext.Provider value={ctx}>{children}</ChartsThemeContext.Provider>;\n}\n\nexport const ChartsThemeContext = createContext<SharedChartsState | undefined>(undefined);\n\nexport function useChartsContext(): SharedChartsState {\n const ctx = useContext(ChartsThemeContext);\n if (ctx === undefined) {\n throw new Error('No ChartsThemeContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function useChartsTheme(): PersesChartsTheme {\n const ctx = useChartsContext();\n return ctx.chartsTheme;\n}\n"],"names":["React","createContext","useContext","useMemo","useState","ChartsProvider","props","children","chartsTheme","enablePinning","lastTooltipPinnedCoords","setLastTooltipPinnedCoords","ctx","ChartsThemeContext","Provider","value","undefined","useChartsContext","Error","useChartsTheme"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,aAAa,EAAgBC,UAAU,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,QAAQ;AAiB1F,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,gBAAgB,KAAK,EAAE,GAAGH;IAEzD,MAAM,CAACI,yBAAyBC,2BAA2B,GAAGP,SAAmC;IAEjG,MAAMQ,MAAMT,QAAQ;QAClB,OAAO;YACLK;YACAC;YACAC;YACAC;QACF;IACF,GAAG;QAACH;QAAaC;QAAeC;QAAyBC;KAA2B;IAEpF,qBAAO,KAACE,mBAAmBC,QAAQ;QAACC,OAAOH;kBAAML;;AACnD;AAEA,OAAO,MAAMM,mCAAqBZ,cAA6Ce,WAAW;AAE1F,OAAO,SAASC;IACd,MAAML,MAAMV,WAAWW;IACvB,IAAID,QAAQI,WAAW;QACrB,MAAM,IAAIE,MAAM;IAClB;IACA,OAAON;AACT;AAEA,OAAO,SAASO;IACd,MAAMP,MAAMK;IACZ,OAAOL,IAAIJ,WAAW;AACxB"}
1
+ {"version":3,"sources":["../../src/context/ChartsProvider.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { createContext, ReactElement, useContext, useMemo, useState } from 'react';\nimport { PersesChartsTheme } from '../model';\nimport { CursorCoordinates } from '../TimeSeriesTooltip';\n\nexport interface ChartsProviderProps {\n chartsTheme: PersesChartsTheme;\n enablePinning?: boolean;\n enableSyncGrouping?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface SharedChartsState {\n chartsTheme: PersesChartsTheme;\n enablePinning: boolean;\n enableSyncGrouping: boolean;\n lastTooltipPinnedCoords: CursorCoordinates | null;\n setLastTooltipPinnedCoords: (lastTooltipPinnedCoords: CursorCoordinates | null) => void;\n}\n\nexport function ChartsProvider(props: ChartsProviderProps): ReactElement {\n const { children, chartsTheme, enablePinning = false, enableSyncGrouping = true } = props;\n\n const [lastTooltipPinnedCoords, setLastTooltipPinnedCoords] = useState<CursorCoordinates | null>(null);\n\n const ctx = useMemo(() => {\n return {\n chartsTheme,\n enablePinning,\n lastTooltipPinnedCoords,\n enableSyncGrouping,\n setLastTooltipPinnedCoords,\n };\n }, [chartsTheme, enablePinning, enableSyncGrouping, lastTooltipPinnedCoords, setLastTooltipPinnedCoords]);\n\n return <ChartsThemeContext.Provider value={ctx}>{children}</ChartsThemeContext.Provider>;\n}\n\nexport const ChartsThemeContext = createContext<SharedChartsState | undefined>(undefined);\n\nexport function useChartsContext(): SharedChartsState {\n const ctx = useContext(ChartsThemeContext);\n if (ctx === undefined) {\n throw new Error('No ChartsThemeContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function useChartsTheme(): PersesChartsTheme {\n const ctx = useChartsContext();\n return ctx.chartsTheme;\n}\n"],"names":["React","createContext","useContext","useMemo","useState","ChartsProvider","props","children","chartsTheme","enablePinning","enableSyncGrouping","lastTooltipPinnedCoords","setLastTooltipPinnedCoords","ctx","ChartsThemeContext","Provider","value","undefined","useChartsContext","Error","useChartsTheme"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,aAAa,EAAgBC,UAAU,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,QAAQ;AAmB1F,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,gBAAgB,KAAK,EAAEC,qBAAqB,IAAI,EAAE,GAAGJ;IAEpF,MAAM,CAACK,yBAAyBC,2BAA2B,GAAGR,SAAmC;IAEjG,MAAMS,MAAMV,QAAQ;QAClB,OAAO;YACLK;YACAC;YACAE;YACAD;YACAE;QACF;IACF,GAAG;QAACJ;QAAaC;QAAeC;QAAoBC;QAAyBC;KAA2B;IAExG,qBAAO,KAACE,mBAAmBC,QAAQ;QAACC,OAAOH;kBAAMN;;AACnD;AAEA,OAAO,MAAMO,mCAAqBb,cAA6CgB,WAAW;AAE1F,OAAO,SAASC;IACd,MAAML,MAAMX,WAAWY;IACvB,IAAID,QAAQI,WAAW;QACrB,MAAM,IAAIE,MAAM;IAClB;IACA,OAAON;AACT;AAEA,OAAO,SAASO;IACd,MAAMP,MAAMK;IACZ,OAAOL,IAAIL,WAAW;AACxB"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './AlignSelector';
2
- export * from './BarChart';
3
2
  export * from './ColorPicker';
4
3
  export * from './ContentWithLegend';
5
4
  export * from './controls';
@@ -12,7 +11,6 @@ export * from './ErrorAlert';
12
11
  export * from './ErrorBoundary';
13
12
  export * from './FontSizeSelector';
14
13
  export * from './FormEditor';
15
- export * from './GaugeChart';
16
14
  export * from './InfoTooltip';
17
15
  export * from './JSONEditor';
18
16
  export * from './Legend';
@@ -23,7 +21,6 @@ export * from './OptionsEditorLayout';
23
21
  export * from './Overlay';
24
22
  export * from './SettingsAutocomplete';
25
23
  export * from './SortSelector';
26
- export * from './StatChart';
27
24
  export * from './Table';
28
25
  export * from './ThresholdsEditor';
29
26
  export * from './TimeChart';
@@ -39,7 +36,5 @@ export * from './test-utils';
39
36
  export * from './theme';
40
37
  export * from './TransformsEditor';
41
38
  export * from './RefreshIntervalPicker';
42
- export * from './PieChart';
43
- export * from './StatusHistoryChart';
44
39
  export * from './ValueMappingEditor';
45
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B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AC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -11,7 +11,6 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  export * from './AlignSelector';
14
- export * from './BarChart';
15
14
  export * from './ColorPicker';
16
15
  export * from './ContentWithLegend';
17
16
  export * from './controls';
@@ -24,7 +23,6 @@ export * from './ErrorAlert';
24
23
  export * from './ErrorBoundary';
25
24
  export * from './FontSizeSelector';
26
25
  export * from './FormEditor';
27
- export * from './GaugeChart';
28
26
  export * from './InfoTooltip';
29
27
  export * from './JSONEditor';
30
28
  export * from './Legend';
@@ -35,7 +33,6 @@ export * from './OptionsEditorLayout';
35
33
  export * from './Overlay';
36
34
  export * from './SettingsAutocomplete';
37
35
  export * from './SortSelector';
38
- export * from './StatChart';
39
36
  export * from './Table';
40
37
  export * from './ThresholdsEditor';
41
38
  export * from './TimeChart';
@@ -51,8 +48,6 @@ export * from './test-utils';
51
48
  export * from './theme';
52
49
  export * from './TransformsEditor';
53
50
  export * from './RefreshIntervalPicker';
54
- export * from './PieChart';
55
- export * from './StatusHistoryChart';
56
51
  export * from './ValueMappingEditor';
57
52
 
58
53
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './AlignSelector';\nexport * from './BarChart';\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './controls';\nexport * from './Dialog';\nexport * from './DensitySelector';\nexport * from './DragAndDrop';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './FontSizeSelector';\nexport * from './FormEditor';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './LinksEditor';\nexport * from './ModeSelector';\nexport * from './OptionsEditorLayout';\nexport * from './Overlay';\nexport * from './SettingsAutocomplete';\nexport * from './SortSelector';\nexport * from './StatChart';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeChart';\nexport * from './TimeRangeSelector';\nexport * from './TimeSeriesTooltip';\nexport * from './ToolbarIconButton';\nexport * from './FormatControls';\nexport * from './YAxisLabel';\nexport * from './context';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\nexport * from './TransformsEditor';\nexport * from './RefreshIntervalPicker';\nexport * from './PieChart';\nexport * from './StatusHistoryChart';\nexport * from './ValueMappingEditor';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,kBAAkB;AAChC,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,YAAY;AAC1B,cAAc,yBAAyB;AACvC,cAAc,iBAAiB;AAC/B,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,aAAa;AAC3B,cAAc,uBAAuB;AACrC,cAAc,uBAAuB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './AlignSelector';\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './controls';\nexport * from './Dialog';\nexport * from './DensitySelector';\nexport * from './DragAndDrop';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './FontSizeSelector';\nexport * from './FormEditor';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './LinksEditor';\nexport * from './ModeSelector';\nexport * from './OptionsEditorLayout';\nexport * from './Overlay';\nexport * from './SettingsAutocomplete';\nexport * from './SortSelector';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeChart';\nexport * from './TimeRangeSelector';\nexport * from './TimeSeriesTooltip';\nexport * from './ToolbarIconButton';\nexport * from './FormatControls';\nexport * from './YAxisLabel';\nexport * from './context';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\nexport * from './TransformsEditor';\nexport * from './RefreshIntervalPicker';\nexport * from './ValueMappingEditor';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB;AAChC,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,kBAAkB;AAChC,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,YAAY;AAC1B,cAAc,yBAAyB;AACvC,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,uBAAuB"}
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/test-utils/theme.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAgB,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAoB/C,eAAO,MAAM,eAAe,EAAE,iBAE5B,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,iBAK/B,CAAC"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/test-utils/theme.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAgB,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAoB/C,eAAO,MAAM,eAAe,EAAE,iBAE5B,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,iBAM/B,CAAC"}
@@ -37,6 +37,7 @@ export const testChartsTheme = generateChartsTheme(createMuiTheme({}), {
37
37
  export const mockChartsContext = {
38
38
  chartsTheme: testChartsTheme,
39
39
  enablePinning: false,
40
+ enableSyncGrouping: true,
40
41
  lastTooltipPinnedCoords: null,
41
42
  setLastTooltipPinnedCoords: ()=>null
42
43
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test-utils/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createTheme as createMuiTheme } from '@mui/material';\nimport { PersesChartsTheme, EChartsTheme } from '../model';\nimport { generateChartsTheme } from '../utils';\nimport { SharedChartsState } from '../context';\n\n// app specific echarts option overrides\nconst TEST_ECHARTS_THEME_OVERRIDES: EChartsTheme = {\n textStyle: { fontFamily: 'Lato' },\n categoryAxis: {\n splitLine: {\n show: false,\n },\n },\n timeAxis: {\n splitLine: {\n show: false,\n },\n },\n bar: {\n barCategoryGap: 2,\n },\n};\n\nexport const testChartsTheme: PersesChartsTheme = generateChartsTheme(createMuiTheme({}), {\n echartsTheme: TEST_ECHARTS_THEME_OVERRIDES,\n});\n\nexport const mockChartsContext: SharedChartsState = {\n chartsTheme: testChartsTheme,\n enablePinning: false,\n lastTooltipPinnedCoords: null,\n setLastTooltipPinnedCoords: () => null,\n};\n"],"names":["createTheme","createMuiTheme","generateChartsTheme","TEST_ECHARTS_THEME_OVERRIDES","textStyle","fontFamily","categoryAxis","splitLine","show","timeAxis","bar","barCategoryGap","testChartsTheme","echartsTheme","mockChartsContext","chartsTheme","enablePinning","lastTooltipPinnedCoords","setLastTooltipPinnedCoords"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,eAAeC,cAAc,QAAQ,gBAAgB;AAE9D,SAASC,mBAAmB,QAAQ,WAAW;AAG/C,wCAAwC;AACxC,MAAMC,+BAA6C;IACjDC,WAAW;QAAEC,YAAY;IAAO;IAChCC,cAAc;QACZC,WAAW;YACTC,MAAM;QACR;IACF;IACAC,UAAU;QACRF,WAAW;YACTC,MAAM;QACR;IACF;IACAE,KAAK;QACHC,gBAAgB;IAClB;AACF;AAEA,OAAO,MAAMC,kBAAqCV,oBAAoBD,eAAe,CAAC,IAAI;IACxFY,cAAcV;AAChB,GAAG;AAEH,OAAO,MAAMW,oBAAuC;IAClDC,aAAaH;IACbI,eAAe;IACfC,yBAAyB;IACzBC,4BAA4B,IAAM;AACpC,EAAE"}
1
+ {"version":3,"sources":["../../src/test-utils/theme.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createTheme as createMuiTheme } from '@mui/material';\nimport { PersesChartsTheme, EChartsTheme } from '../model';\nimport { generateChartsTheme } from '../utils';\nimport { SharedChartsState } from '../context';\n\n// app specific echarts option overrides\nconst TEST_ECHARTS_THEME_OVERRIDES: EChartsTheme = {\n textStyle: { fontFamily: 'Lato' },\n categoryAxis: {\n splitLine: {\n show: false,\n },\n },\n timeAxis: {\n splitLine: {\n show: false,\n },\n },\n bar: {\n barCategoryGap: 2,\n },\n};\n\nexport const testChartsTheme: PersesChartsTheme = generateChartsTheme(createMuiTheme({}), {\n echartsTheme: TEST_ECHARTS_THEME_OVERRIDES,\n});\n\nexport const mockChartsContext: SharedChartsState = {\n chartsTheme: testChartsTheme,\n enablePinning: false,\n enableSyncGrouping: true,\n lastTooltipPinnedCoords: null,\n setLastTooltipPinnedCoords: () => null,\n};\n"],"names":["createTheme","createMuiTheme","generateChartsTheme","TEST_ECHARTS_THEME_OVERRIDES","textStyle","fontFamily","categoryAxis","splitLine","show","timeAxis","bar","barCategoryGap","testChartsTheme","echartsTheme","mockChartsContext","chartsTheme","enablePinning","enableSyncGrouping","lastTooltipPinnedCoords","setLastTooltipPinnedCoords"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,eAAeC,cAAc,QAAQ,gBAAgB;AAE9D,SAASC,mBAAmB,QAAQ,WAAW;AAG/C,wCAAwC;AACxC,MAAMC,+BAA6C;IACjDC,WAAW;QAAEC,YAAY;IAAO;IAChCC,cAAc;QACZC,WAAW;YACTC,MAAM;QACR;IACF;IACAC,UAAU;QACRF,WAAW;YACTC,MAAM;QACR;IACF;IACAE,KAAK;QACHC,gBAAgB;IAClB;AACF;AAEA,OAAO,MAAMC,kBAAqCV,oBAAoBD,eAAe,CAAC,IAAI;IACxFY,cAAcV;AAChB,GAAG;AAEH,OAAO,MAAMW,oBAAuC;IAClDC,aAAaH;IACbI,eAAe;IACfC,oBAAoB;IACpBC,yBAAyB;IACzBC,4BAA4B,IAAM;AACpC,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/components",
3
- "version": "0.0.0-snapshot-histogram-types-78c5104",
3
+ "version": "0.0.0-snapshot-profile-8090608",
4
4
  "description": "Common UI components used across Perses features",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/perses/perses/blob/main/README.md",
@@ -15,9 +15,7 @@
15
15
  "main": "dist/cjs/index.js",
16
16
  "types": "dist/index.d.ts",
17
17
  "sideEffects": [
18
- "./dist/GaugeChart/GaugeChart.js",
19
- "./dist/LineChart/LineChart.js",
20
- "./dist/StatChart/StatChart.js"
18
+ "./dist/LineChart/LineChart.js"
21
19
  ],
22
20
  "scripts": {
23
21
  "clean": "rimraf dist/",
@@ -38,7 +36,7 @@
38
36
  "@codemirror/lang-json": "^6.0.1",
39
37
  "@fontsource/lato": "^4.5.10",
40
38
  "@mui/x-date-pickers": "^7.23.1",
41
- "@perses-dev/core": "0.0.0-snapshot-histogram-types-78c5104",
39
+ "@perses-dev/core": "0.0.0-snapshot-profile-8090608",
42
40
  "@tanstack/react-table": "^8.20.5",
43
41
  "@uiw/react-codemirror": "^4.19.1",
44
42
  "date-fns": "^4.1.0",
@@ -1,16 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { FormatOptions } from '@perses-dev/core';
3
- import { ModeOption } from '../ModeSelector';
4
- export interface BarChartData {
5
- label: string;
6
- value: number | null;
7
- }
8
- export interface BarChartProps {
9
- width: number;
10
- height: number;
11
- data: BarChartData[] | null;
12
- format?: FormatOptions;
13
- mode?: ModeOption;
14
- }
15
- export declare function BarChart(props: BarChartProps): ReactElement;
16
- //# sourceMappingURL=BarChart.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../src/BarChart/BarChart.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAQ9D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQ7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CA2F3D"}
@@ -1,134 +0,0 @@
1
- // Copyright 2023 The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { useMemo } from 'react';
15
- import { formatValue } from '@perses-dev/core';
16
- import { use } from 'echarts/core';
17
- import { BarChart as EChartsBarChart } from 'echarts/charts';
18
- import { GridComponent, DatasetComponent, TitleComponent, TooltipComponent } from 'echarts/components';
19
- import { CanvasRenderer } from 'echarts/renderers';
20
- import { Box } from '@mui/material';
21
- import { useChartsTheme } from '../context';
22
- import { EChart } from '../EChart';
23
- import { getFormattedAxis } from '../utils';
24
- use([
25
- EChartsBarChart,
26
- GridComponent,
27
- DatasetComponent,
28
- TitleComponent,
29
- TooltipComponent,
30
- CanvasRenderer
31
- ]);
32
- const BAR_WIN_WIDTH = 14;
33
- const BAR_GAP = 6;
34
- export function BarChart(props) {
35
- const { width, height, data, format = {
36
- unit: 'decimal'
37
- }, mode = 'value' } = props;
38
- const chartsTheme = useChartsTheme();
39
- const option = useMemo(()=>{
40
- if (!data || !data.length) return chartsTheme.noDataOption;
41
- const source = [];
42
- data.map((d)=>{
43
- source.push([
44
- d.label,
45
- d.value
46
- ]);
47
- });
48
- return {
49
- title: {
50
- show: false
51
- },
52
- dataset: [
53
- {
54
- dimensions: [
55
- 'label',
56
- 'value'
57
- ],
58
- source: source
59
- }
60
- ],
61
- xAxis: getFormattedAxis({}, format),
62
- yAxis: {
63
- type: 'category',
64
- splitLine: {
65
- show: false
66
- },
67
- axisLabel: {
68
- overflow: 'truncate',
69
- width: width / 3
70
- }
71
- },
72
- series: {
73
- type: 'bar',
74
- label: {
75
- show: true,
76
- position: 'right',
77
- formatter: (params)=>{
78
- if (!params.data[1]) {
79
- return undefined;
80
- }
81
- if (mode === 'percentage') {
82
- return formatValue(params.data[1], {
83
- unit: 'percent',
84
- decimalPlaces: format.decimalPlaces
85
- });
86
- }
87
- return formatValue(params.data[1], format);
88
- },
89
- barMinWidth: BAR_WIN_WIDTH,
90
- barCategoryGap: BAR_GAP
91
- },
92
- itemStyle: {
93
- borderRadius: 4,
94
- color: chartsTheme.echartsTheme[0]
95
- }
96
- },
97
- tooltip: {
98
- appendToBody: true,
99
- confine: true,
100
- formatter: (params)=>params.data[1] && `<b>${params.name}</b> &emsp; ${formatValue(params.data[1], format)}`
101
- },
102
- // increase distance between grid and container to prevent y axis labels from getting cut off
103
- grid: {
104
- left: '5%',
105
- right: '5%'
106
- }
107
- };
108
- }, [
109
- data,
110
- chartsTheme,
111
- width,
112
- mode,
113
- format
114
- ]);
115
- return /*#__PURE__*/ _jsx(Box, {
116
- style: {
117
- width: width,
118
- height: height
119
- },
120
- sx: {
121
- overflow: 'auto'
122
- },
123
- children: /*#__PURE__*/ _jsx(EChart, {
124
- sx: {
125
- minHeight: height,
126
- height: data ? data.length * (BAR_WIN_WIDTH + BAR_GAP) : '100%'
127
- },
128
- option: option,
129
- theme: chartsTheme.echartsTheme
130
- })
131
- });
132
- }
133
-
134
- //# sourceMappingURL=BarChart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/BarChart/BarChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, useMemo } from 'react';\nimport { FormatOptions, formatValue } from '@perses-dev/core';\nimport { use, EChartsCoreOption } from 'echarts/core';\nimport { BarChart as EChartsBarChart } from 'echarts/charts';\nimport { GridComponent, DatasetComponent, TitleComponent, TooltipComponent } from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { Box } from '@mui/material';\nimport { useChartsTheme } from '../context';\nimport { EChart } from '../EChart';\nimport { ModeOption } from '../ModeSelector';\nimport { getFormattedAxis } from '../utils';\n\nuse([EChartsBarChart, GridComponent, DatasetComponent, TitleComponent, TooltipComponent, CanvasRenderer]);\n\nconst BAR_WIN_WIDTH = 14;\nconst BAR_GAP = 6;\n\nexport interface BarChartData {\n label: string;\n value: number | null;\n}\n\nexport interface BarChartProps {\n width: number;\n height: number;\n data: BarChartData[] | null;\n format?: FormatOptions;\n mode?: ModeOption;\n}\n\nexport function BarChart(props: BarChartProps): ReactElement {\n const { width, height, data, format = { unit: 'decimal' }, mode = 'value' } = props;\n const chartsTheme = useChartsTheme();\n\n const option: EChartsCoreOption = useMemo(() => {\n if (!data || !data.length) return chartsTheme.noDataOption;\n\n const source: Array<Array<BarChartData['label'] | BarChartData['value']>> = [];\n data.map((d) => {\n source.push([d.label, d.value]);\n });\n\n return {\n title: {\n show: false,\n },\n dataset: [\n {\n dimensions: ['label', 'value'],\n source: source,\n },\n ],\n xAxis: getFormattedAxis({}, format),\n yAxis: {\n type: 'category',\n splitLine: {\n show: false,\n },\n axisLabel: {\n overflow: 'truncate',\n width: width / 3,\n },\n },\n series: {\n type: 'bar',\n label: {\n show: true,\n position: 'right',\n formatter: (params: { data: number[] }): string | undefined => {\n if (!params.data[1]) {\n return undefined;\n }\n\n if (mode === 'percentage') {\n return formatValue(params.data[1]!, {\n unit: 'percent',\n decimalPlaces: format.decimalPlaces,\n });\n }\n return formatValue(params.data[1], format);\n },\n barMinWidth: BAR_WIN_WIDTH,\n barCategoryGap: BAR_GAP,\n },\n itemStyle: {\n borderRadius: 4,\n color: chartsTheme.echartsTheme[0],\n },\n },\n tooltip: {\n appendToBody: true,\n confine: true,\n formatter: (params: { name: string; data: number[] }) =>\n params.data[1] && `<b>${params.name}</b> &emsp; ${formatValue(params.data[1], format)}`,\n },\n // increase distance between grid and container to prevent y axis labels from getting cut off\n grid: {\n left: '5%',\n right: '5%',\n },\n };\n }, [data, chartsTheme, width, mode, format]);\n\n return (\n <Box\n style={{\n width: width,\n height: height,\n }}\n sx={{ overflow: 'auto' }}\n >\n <EChart\n sx={{\n minHeight: height,\n height: data ? data.length * (BAR_WIN_WIDTH + BAR_GAP) : '100%',\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n />\n </Box>\n );\n}\n"],"names":["useMemo","formatValue","use","BarChart","EChartsBarChart","GridComponent","DatasetComponent","TitleComponent","TooltipComponent","CanvasRenderer","Box","useChartsTheme","EChart","getFormattedAxis","BAR_WIN_WIDTH","BAR_GAP","props","width","height","data","format","unit","mode","chartsTheme","option","length","noDataOption","source","map","d","push","label","value","title","show","dataset","dimensions","xAxis","yAxis","type","splitLine","axisLabel","overflow","series","position","formatter","params","undefined","decimalPlaces","barMinWidth","barCategoryGap","itemStyle","borderRadius","color","echartsTheme","tooltip","appendToBody","confine","name","grid","left","right","style","sx","minHeight","theme"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AA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;gBACNR,OAAO;oBACLG,MAAM;oBACNU,UAAU;oBACVC,WAAW,CAACC;wBACV,IAAI,CAACA,OAAO3B,IAAI,CAAC,EAAE,EAAE;4BACnB,OAAO4B;wBACT;wBAEA,IAAIzB,SAAS,cAAc;4BACzB,OAAOrB,YAAY6C,OAAO3B,IAAI,CAAC,EAAE,EAAG;gCAClCE,MAAM;gCACN2B,eAAe5B,OAAO4B,aAAa;4BACrC;wBACF;wBACA,OAAO/C,YAAY6C,OAAO3B,IAAI,CAAC,EAAE,EAAEC;oBACrC;oBACA6B,aAAanC;oBACboC,gBAAgBnC;gBAClB;gBACAoC,WAAW;oBACTC,cAAc;oBACdC,OAAO9B,YAAY+B,YAAY,CAAC,EAAE;gBACpC;YACF;YACAC,SAAS;gBACPC,cAAc;gBACdC,SAAS;gBACTZ,WAAW,CAACC,SACVA,OAAO3B,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE2B,OAAOY,IAAI,CAAC,YAAY,EAAEzD,YAAY6C,OAAO3B,IAAI,CAAC,EAAE,EAAEC,SAAS;YAC3F;YACA,6FAA6F;YAC7FuC,MAAM;gBACJC,MAAM;gBACNC,OAAO;YACT;QACF;IACF,GAAG;QAAC1C;QAAMI;QAAaN;QAAOK;QAAMF;KAAO;IAE3C,qBACE,KAACV;QACCoD,OAAO;YACL7C,OAAOA;YACPC,QAAQA;QACV;QACA6C,IAAI;YAAErB,UAAU;QAAO;kBAEvB,cAAA,KAAC9B;YACCmD,IAAI;gBACFC,WAAW9C;gBACXA,QAAQC,OAAOA,KAAKM,MAAM,GAAIX,CAAAA,gBAAgBC,OAAM,IAAK;YAC3D;YACAS,QAAQA;YACRyC,OAAO1C,YAAY+B,YAAY;;;AAIvC"}
@@ -1,2 +0,0 @@
1
- export * from './BarChart';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/BarChart/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAC"}
@@ -1,15 +0,0 @@
1
- // Copyright 2023 The Perses Authors
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
- export * from './BarChart';
14
-
15
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/BarChart/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './BarChart';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,aAAa"}
@@ -1,23 +0,0 @@
1
- import { FormatOptions } from '@perses-dev/core';
2
- import { GaugeSeriesOption } from 'echarts/charts';
3
- import { ReactElement } from 'react';
4
- export type GaugeChartValue = number | null | undefined;
5
- export type GaugeSeries = {
6
- value: GaugeChartValue;
7
- label: string;
8
- };
9
- export interface GaugeChartProps {
10
- width: number;
11
- height: number;
12
- data: GaugeSeries;
13
- format: FormatOptions;
14
- axisLine: GaugeSeriesOption['axisLine'];
15
- max?: number;
16
- }
17
- export declare function GaugeChart(props: GaugeChartProps): ReactElement;
18
- /**
19
- * Responsive font size depending on number of characters, clamp used
20
- * to ensure size stays within given range
21
- */
22
- export declare function getResponsiveValueSize(value: number | null, format: FormatOptions, width: number, height: number): string;
23
- //# sourceMappingURL=GaugeChart.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GaugeChart.d.ts","sourceRoot":"","sources":["../../src/GaugeChart/GaugeChart.tsx"],"names":[],"mappings":"AAaA,OAAO,EAA4B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAmC,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGpF,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAWrC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAuJ/D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,MAAM,CAQR"}