From 012f1db6e4253122844031fd0d61721fc079aeb4 Mon Sep 17 00:00:00 2001 From: sindhu Date: Tue, 30 Apr 2024 14:00:59 +0700 Subject: [PATCH] bar chart type --- services/chart.services.go | 41 ++++++++++++++++++++++++++++++++++++ views/mcu/peserta/bagian.txt | 0 2 files changed, 41 insertions(+) create mode 100644 views/mcu/peserta/bagian.txt diff --git a/services/chart.services.go b/services/chart.services.go index fd2ce24..2c0b74b 100644 --- a/services/chart.services.go +++ b/services/chart.services.go @@ -58,6 +58,47 @@ type Series struct { } `json:"emphasis"` } +type Barchart struct { + Title struct { + Text string `json:"text"` + } `json:"title"` + Dataset struct { + Source [][]interface{} `json:"source"` + } `json:"dataset"` + Grid struct { + ContainLabel bool `json:"containLabel"` + } `json:"grid"` + XAxis struct { + Name string `json:"name"` + } `json:"xAxis"` + YAxis struct { + Type string `json:"type"` + } `json:"yAxis"` + VisualMap struct { + Orient string `json:"orient"` + Left string `json:"left"` + Min int `json:"min"` + Max int `json:"max"` + Show bool `json:"show"` + Dimension int `json:"dimension"` + InRange struct { + Color []string `json:"color"` + } `json:"inRange"` + } `json:"visualMap"` + Series []struct { + Label struct { + Position string `json:"position"` + Show bool `json:"show"` + Formatter string `json:"formatter"` + } `json:"label"` + Type string `json:"type"` + Encode struct { + X string `json:"x"` + Y string `json:"y"` + } `json:"encode"` + } `json:"series"` +} + type Piechart struct { // ID int `json:"id"` // Xsamplename string `json:"Xsamplename"` diff --git a/views/mcu/peserta/bagian.txt b/views/mcu/peserta/bagian.txt new file mode 100644 index 0000000..e69de29