This PR is the first part of the creation of the Chart editor. https://github.com/user-attachments/assets/8b0af8ea-be41-4506-84cb-e40f5521cbf0 Done: - Bar chart settings (except filters) - Line chart settings (except filters) In progress: - Pie chart settings - Number chart settings - Gauge chart settings Left to do: - Loosen the backend validation to allow the user to save a partial configuration, validate the graph configuration in the frontend and display a error friendly message in the graph if the config is not completed yet - Implement the filter edition - Finish the other graph types settings
108 lines
1.7 KiB
TypeScript
108 lines
1.7 KiB
TypeScript
export const PAGE_LAYOUT_GQL_FIELDS = `
|
|
id
|
|
name
|
|
type
|
|
objectMetadataId
|
|
createdAt
|
|
updatedAt
|
|
deletedAt
|
|
`;
|
|
|
|
export const PAGE_LAYOUT_TAB_GQL_FIELDS = `
|
|
id
|
|
title
|
|
position
|
|
pageLayoutId
|
|
createdAt
|
|
updatedAt
|
|
deletedAt
|
|
`;
|
|
|
|
export const PAGE_LAYOUT_WIDGET_CONFIGURATION_FIELDS = `
|
|
... on IframeConfiguration {
|
|
url
|
|
}
|
|
... on BarChartConfiguration {
|
|
graphType
|
|
aggregateFieldMetadataId
|
|
aggregateOperation
|
|
groupByFieldMetadataIdX
|
|
orderByX
|
|
groupByFieldMetadataIdY
|
|
orderByY
|
|
omitNullValues
|
|
axisNameDisplay
|
|
displayDataLabel
|
|
rangeMin
|
|
rangeMax
|
|
filter
|
|
color
|
|
description
|
|
}
|
|
... on LineChartConfiguration {
|
|
graphType
|
|
aggregateFieldMetadataId
|
|
aggregateOperation
|
|
groupByFieldMetadataIdX
|
|
orderByX
|
|
groupByFieldMetadataIdY
|
|
orderByY
|
|
omitNullValues
|
|
axisNameDisplay
|
|
displayDataLabel
|
|
rangeMin
|
|
rangeMax
|
|
filter
|
|
color
|
|
description
|
|
}
|
|
... on PieChartConfiguration {
|
|
graphType
|
|
groupByFieldMetadataId
|
|
aggregateFieldMetadataId
|
|
aggregateOperation
|
|
orderBy
|
|
displayDataLabel
|
|
filter
|
|
color
|
|
description
|
|
}
|
|
... on NumberChartConfiguration {
|
|
graphType
|
|
aggregateFieldMetadataId
|
|
aggregateOperation
|
|
description
|
|
filter
|
|
color
|
|
format
|
|
label
|
|
}
|
|
... on GaugeChartConfiguration {
|
|
graphType
|
|
aggregateFieldMetadataId
|
|
aggregateOperation
|
|
description
|
|
filter
|
|
}
|
|
`;
|
|
|
|
export const PAGE_LAYOUT_WIDGET_GQL_FIELDS = `
|
|
id
|
|
title
|
|
type
|
|
pageLayoutTabId
|
|
objectMetadataId
|
|
gridPosition {
|
|
row
|
|
column
|
|
rowSpan
|
|
columnSpan
|
|
}
|
|
configuration {
|
|
${PAGE_LAYOUT_WIDGET_CONFIGURATION_FIELDS}
|
|
}
|
|
createdAt
|
|
updatedAt
|
|
deletedAt
|
|
`;
|