MCPcopy Create free account
hub / github.com/dataease/SQLBot / getOptions

Function getOptions

g2-ssr/app.js:23–48  ·  view source on GitHub ↗
(type, axis, data)

Source from the content-addressed store, hash-verified

21});
22
23function getOptions(type, axis, data) {
24
25 const base_options = {
26 width: 640,
27 height: 480,
28 imageType: 'png',
29 theme: {
30 view: {
31 viewFill: '#FFFFFF',
32 },
33 }
34 }
35
36 switch (type) {
37 case 'bar':
38 return getBarOptions(base_options, axis, data);
39 case 'column':
40 return getColumnOptions(base_options, axis, data);
41 case 'line':
42 return getLineOptions(base_options, axis, data);
43 case 'pie':
44 return getPieOptions(base_options, axis, data);
45 }
46
47 return base_options
48}
49
50
51// 创建 Chart 和配置

Callers 1

GenerateChartsFunction · 0.85

Calls 4

getBarOptionsFunction · 0.85
getColumnOptionsFunction · 0.85
getLineOptionsFunction · 0.85
getPieOptionsFunction · 0.85

Tested by

no test coverage detected