Skip to content

Commit 4e4280f

Browse files
committed
Improve ScatterChart Data
1 parent 6e62f3d commit 4e4280f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

client/packages/lowcoder-comps/src/comps/scatterChartComp/scatterChartConstants.tsx

+26-1
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,34 @@ const ChartOptionComp = withType(ChartOptionMap, "scatter");
217217
const EchartsOptionComp = withType(EchartsOptionMap, "funnel");
218218
export type CharOptionCompType = keyof typeof ChartOptionMap;
219219

220+
export const SCATTER_CHART_DEMO_DATA = [
221+
222+
{ hours: 1.5, score: 62, student: "Alex M." },
223+
{ hours: 2.0, score: 65, student: "Sarah P." },
224+
{ hours: 2.5, score: 71, student: "James W." },
225+
{ hours: 2.8, score: 69, student: "Emma L." },
226+
{ hours: 3.0, score: 75, student: "Michael R." },
227+
{ hours: 3.2, score: 73, student: "Lisa K." },
228+
{ hours: 3.5, score: 78, student: "David H." },
229+
{ hours: 3.8, score: 77, student: "Sophie T." },
230+
{ hours: 4.0, score: 82, student: "Ryan B." },
231+
{ hours: 4.2, score: 84, student: "Nina C." },
232+
{ hours: 4.5, score: 86, student: "Thomas G." },
233+
{ hours: 4.8, score: 88, student: "Maria S." },
234+
{ hours: 5.0, score: 89, student: "Daniel F." },
235+
{ hours: 5.2, score: 91, student: "Anna D." },
236+
{ hours: 5.5, score: 90, student: "Kevin P." },
237+
{ hours: 5.8, score: 93, student: "Rachel M." },
238+
{ hours: 6.0, score: 95, student: "John L." },
239+
{ hours: 6.2, score: 94, student: "Emily W." },
240+
{ hours: 3.0, score: 68, student: "Chris B." }, // outlier - lower performance
241+
{ hours: 5.0, score: 96, student: "Jessica H." } // outlier - higher performance
242+
243+
]
244+
220245
export const chartUiModeChildren = {
221246
title: withDefault(StringControl, trans("echarts.defaultTitle")),
222-
data: jsonControl(toJSONObjectArray, i18nObjs.defaultDataSource),
247+
data: jsonControl(toJSONObjectArray, SCATTER_CHART_DEMO_DATA),
223248
xAxisKey: valueComp<string>(""), // x-axis, key from data
224249
xAxisDirection: dropdownControl(XAxisDirectionOptions, "horizontal"),
225250
xAxisData: jsonControl(toArray, []),

0 commit comments

Comments
 (0)