mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 16:10:43 +00:00
fix: dashboard gauge chart getAxesOnZeroOf issue (#3801)
 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved rendering logic for gauge and table chart types, ensuring correct display order in dashboards. - **New Features** - Enhanced data filtering for panels, now supporting both "metric" and "gauge" types for more accurate data representation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -344,6 +344,7 @@ export default defineComponent({
|
||||
case "h-stacked":
|
||||
case "line":
|
||||
case "scatter":
|
||||
case "gauge":
|
||||
case "table": {
|
||||
// return data.value[0].some((it: any) => {return (xAlias.every((x: any) => it[x]) && yAlias.every((y: any) => it[y]))});
|
||||
return (
|
||||
@@ -352,7 +353,6 @@ export default defineComponent({
|
||||
yAlias.every((y: any) => data.value[0][0][y]) != null)
|
||||
);
|
||||
}
|
||||
case "gauge":
|
||||
case "metric": {
|
||||
return (
|
||||
data.value[0]?.length > 1 ||
|
||||
|
||||
@@ -1697,8 +1697,8 @@ export const convertSQLData = async (
|
||||
}
|
||||
|
||||
//check if is there any data else filter out axis or series data
|
||||
// for metric we does not have data field
|
||||
if (panelSchema.type != "metric") {
|
||||
// for metric, gauge we does not have data field
|
||||
if (!["metric", "gauge"].includes(panelSchema.type)) {
|
||||
options.series = options.series.filter((it: any) => it.data?.length);
|
||||
if (panelSchema.type == "h-bar" || panelSchema.type == "h-stacked") {
|
||||
options.xAxis = options.series.length ? options.xAxis : {};
|
||||
|
||||
Reference in New Issue
Block a user