@dative-gpi/foundation-shared-components 1.1.21-fs-chart → 1.1.21-fs-chart-2

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.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
5
5
  },
6
6
  "sideEffects": false,
7
- "version": "1.1.21-fs-chart",
7
+ "version": "1.1.21-fs-chart-2",
8
8
  "description": "",
9
9
  "publishConfig": {
10
10
  "access": "public"
@@ -13,8 +13,8 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "@dative-gpi/foundation-shared-domain": "1.1.21-fs-chart",
17
- "@dative-gpi/foundation-shared-services": "1.1.21-fs-chart"
16
+ "@dative-gpi/foundation-shared-domain": "1.1.21-fs-chart-2",
17
+ "@dative-gpi/foundation-shared-services": "1.1.21-fs-chart-2"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@dative-gpi/bones-ui": "^1.1.0",
@@ -30,7 +30,6 @@
30
30
  "@mdi/font": "^7.4.47",
31
31
  "blurhash": "2.0.5",
32
32
  "color": "^4.2.3",
33
- "echarts": "6.1.0",
34
33
  "leaflet": "1.9.4",
35
34
  "leaflet.markercluster": "1.5.3"
36
35
  },
@@ -39,5 +38,5 @@
39
38
  "sass": "1.71.1",
40
39
  "sass-loader": "13.3.2"
41
40
  },
42
- "gitHead": "864a113dfcf02c641af3cbc0b27930e3d35e9f32"
41
+ "gitHead": "2433c646295815be1606ba105a295cd769d59693"
43
42
  }
@@ -1,55 +0,0 @@
1
- <template>
2
- <div
3
- ref="chartEl"
4
- style="width: 100%; height: 100%"
5
- />
6
- </template>
7
-
8
- <script lang="ts">
9
- import { defineComponent, onBeforeUnmount, onMounted, type PropType, ref, watch } from "vue";
10
- import { type ECharts, type EChartsOption, init as initECharts } from "echarts";
11
- import { useResize } from "@dative-gpi/bones-ui/composables";
12
-
13
- export default defineComponent({
14
- name: "FSChart",
15
- props: {
16
- option: {
17
- type: Object as PropType<EChartsOption>,
18
- required: true
19
- }
20
- },
21
- setup(props) {
22
- const chartEl = ref<HTMLDivElement | null>(null);
23
- let chart: ECharts | null = null;
24
-
25
- useResize(() => chartEl.value, () => {
26
- chart?.resize();
27
- });
28
-
29
- onMounted(() => {
30
- if (!chartEl.value) {
31
- return;
32
- }
33
- chart = initECharts(chartEl.value);
34
- chart.setOption(props.option);
35
- });
36
-
37
- watch(
38
- () => props.option,
39
- (newOption) => {
40
- chart?.setOption(newOption, true);
41
- },
42
- { deep: true }
43
- );
44
-
45
- onBeforeUnmount(() => {
46
- chart?.dispose();
47
- chart = null;
48
- });
49
-
50
- return {
51
- chartEl
52
- };
53
- }
54
- });
55
- </script>