1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| CSV(file("https://docs.machbase.com/assets/example/iris.csv"))
MAPVALUE(4, strToUpper(strTrimPrefix(value(4), "Iris-")))
BOXPLOT(
value(0),
category(value(4)),
order("SETOSA", "VERSICOLOR", "VIRGINICA"),
boxplotOutput("chart")
)
CHART(
chartOption({
grid: { bottom: "15%" },
xAxis:{ type:"category", boundaryGap: true, data: column(0) },
yAxis:{ type:"value", name: "sepal length", min:4, max:8, splitArea:{ show: true } },
series:[
{ name: "sepal length", type:"boxplot", data: column(1)},
{ name: "outlier", type:"scatter", data: column(2).flat()},
],
tooltip: { trigger: 'item', axisPointer: { type: 'shadow' } },
legend: {show: true, bottom:'2%'},
title:[ { text: "Iris Sepal Length", left: "center" } ]
})
)
|