mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
update charts
This commit is contained in:
parent
bdc671ada8
commit
84315db9c5
@ -29,7 +29,15 @@ defineProps({
|
||||
},
|
||||
intervalTime: { type: Array as PropType<string[]>, default: () => [] },
|
||||
config: {
|
||||
type: Object as PropType<AreaConfig>,
|
||||
type: Object as PropType<
|
||||
AreaConfig & {
|
||||
filters: {
|
||||
value: number | string;
|
||||
dataIndex: number;
|
||||
sourceId: string;
|
||||
};
|
||||
} & { id: string }
|
||||
>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
|
@ -13,15 +13,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License. -->
|
||||
<template>
|
||||
<Graph :option="option" />
|
||||
<Graph :option="option" @select="clickEvent" :filters="config.filters" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed } from "vue";
|
||||
import type { PropType } from "vue";
|
||||
import { Event } from "@/types/events";
|
||||
import { BarConfig } from "@/types/dashboard";
|
||||
import { BarConfig, EventParams } from "@/types/dashboard";
|
||||
|
||||
/*global defineProps */
|
||||
/*global defineProps, defineEmits */
|
||||
const emits = defineEmits(["click"]);
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object as PropType<{ [key: string]: number[] }>,
|
||||
@ -31,7 +32,15 @@ const props = defineProps({
|
||||
theme: { type: String, default: "light" },
|
||||
itemEvents: { type: Array as PropType<Event[]>, default: () => [] },
|
||||
config: {
|
||||
type: Object as PropType<BarConfig>,
|
||||
type: Object as PropType<
|
||||
BarConfig & {
|
||||
filters: {
|
||||
value: number | string;
|
||||
dataIndex: number;
|
||||
sourceId: string;
|
||||
};
|
||||
} & { id: string }
|
||||
>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
@ -147,6 +156,14 @@ function getOption() {
|
||||
},
|
||||
enterable: true,
|
||||
extraCssText: "max-height: 300px; overflow: auto; border: none",
|
||||
axisPointer: {
|
||||
lineStyle: {
|
||||
width: 2,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
type: "scroll",
|
||||
@ -186,4 +203,7 @@ function getOption() {
|
||||
series: temp,
|
||||
};
|
||||
}
|
||||
function clickEvent(params: EventParams) {
|
||||
emits("click", params);
|
||||
}
|
||||
</script>
|
||||
|
@ -162,6 +162,14 @@ function getOption() {
|
||||
enterable: true,
|
||||
confine: true,
|
||||
extraCssText: "max-height: 300px; overflow: auto; border: none;",
|
||||
axisPointer: {
|
||||
lineStyle: {
|
||||
width: 2,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
};
|
||||
const tips = {
|
||||
formatter(params: any) {
|
||||
|
Loading…
Reference in New Issue
Block a user