@graphenedata/cli 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/LICENSE.md +3 -3
  2. package/README.md +138 -0
  3. package/THIRD_PARTY_NOTICES.md +1 -0
  4. package/bin.js +2 -2
  5. package/dist/cli/bigQuery-I3F46SC6.js +75 -0
  6. package/dist/cli/bigQuery-I3F46SC6.js.map +7 -0
  7. package/dist/cli/chunk-OVWODUTJ.js +12849 -0
  8. package/dist/cli/chunk-OVWODUTJ.js.map +7 -0
  9. package/dist/cli/chunk-QAXEOZ43.js +53 -0
  10. package/dist/cli/chunk-QAXEOZ43.js.map +7 -0
  11. package/dist/cli/cli.js +245 -10290
  12. package/dist/cli/clickhouse-ZN5AN2UL.js +64 -0
  13. package/dist/cli/clickhouse-ZN5AN2UL.js.map +7 -0
  14. package/dist/cli/duckdb-IYBIO5KJ.js +87 -0
  15. package/dist/cli/duckdb-IYBIO5KJ.js.map +7 -0
  16. package/dist/cli/serve2-TNN5EROW.js +447 -0
  17. package/dist/cli/serve2-TNN5EROW.js.map +7 -0
  18. package/dist/cli/snowflake-MOQB5GA4.js +128 -0
  19. package/dist/cli/snowflake-MOQB5GA4.js.map +7 -0
  20. package/dist/index.d.ts +63 -0
  21. package/dist/lang/index.d.ts +63 -0
  22. package/dist/skills/graphene/SKILL.md +235 -0
  23. package/dist/skills/graphene/references/big-value.md +20 -0
  24. package/dist/skills/graphene/references/date-range.md +64 -0
  25. package/dist/skills/graphene/references/dropdown.md +62 -0
  26. package/dist/skills/graphene/references/echarts.md +162 -0
  27. package/dist/skills/graphene/references/gsql.md +393 -0
  28. package/dist/skills/graphene/references/model-gsql.md +72 -0
  29. package/dist/skills/graphene/references/table.md +143 -0
  30. package/dist/skills/graphene/references/text-input.md +29 -0
  31. package/dist/ui/app.css +263 -299
  32. package/dist/ui/component-utilities/dataShaping.ts +484 -0
  33. package/dist/ui/component-utilities/dataSummary.ts +57 -0
  34. package/dist/ui/component-utilities/enrich.ts +763 -0
  35. package/dist/ui/component-utilities/format.ts +177 -0
  36. package/dist/ui/component-utilities/inputUtils.ts +48 -9
  37. package/dist/ui/component-utilities/theme.ts +200 -0
  38. package/dist/ui/component-utilities/themeStores.ts +26 -21
  39. package/dist/ui/component-utilities/types.ts +70 -0
  40. package/dist/ui/components/AreaChart.svelte +57 -105
  41. package/dist/ui/components/BarChart.svelte +71 -129
  42. package/dist/ui/components/BigValue.svelte +24 -40
  43. package/dist/ui/components/Column.svelte +11 -19
  44. package/dist/ui/components/DateRange.svelte +71 -34
  45. package/dist/ui/components/Dropdown.svelte +82 -49
  46. package/dist/ui/components/DropdownOption.svelte +1 -2
  47. package/dist/ui/components/ECharts.svelte +179 -60
  48. package/dist/ui/components/InlineDelta.svelte +51 -32
  49. package/dist/ui/components/LineChart.svelte +54 -125
  50. package/dist/ui/components/PieChart.svelte +27 -37
  51. package/dist/ui/components/QueryLoad.svelte +78 -44
  52. package/dist/ui/components/Row.svelte +2 -1
  53. package/dist/ui/components/ScatterPlot.svelte +52 -0
  54. package/dist/ui/components/Skeleton.svelte +32 -0
  55. package/dist/ui/components/Table.svelte +3 -2
  56. package/dist/ui/components/TableGroupRow.svelte +28 -36
  57. package/dist/ui/components/TableHarness.svelte +32 -0
  58. package/dist/ui/components/TableHeader.svelte +34 -59
  59. package/dist/ui/components/TableRow.svelte +15 -39
  60. package/dist/ui/components/TableSubtotalRow.svelte +26 -21
  61. package/dist/ui/components/TableTotalRow.svelte +27 -37
  62. package/dist/ui/components/TextInput.svelte +17 -14
  63. package/dist/ui/components/Value.svelte +25 -0
  64. package/dist/ui/components/_Table.svelte +80 -76
  65. package/dist/ui/internal/ChartGallery.svelte +527 -0
  66. package/dist/ui/internal/ErrorDisplay.svelte +60 -0
  67. package/dist/ui/internal/LocalApp.svelte +87 -19
  68. package/dist/ui/internal/PageNavGroup.svelte +269 -0
  69. package/dist/ui/internal/Sidebar.svelte +178 -0
  70. package/dist/ui/internal/SidebarToggle.svelte +47 -0
  71. package/dist/ui/internal/StyleGallery.svelte +244 -0
  72. package/dist/ui/internal/clientCache.ts +15 -13
  73. package/dist/ui/internal/pageInputs.svelte.js +292 -0
  74. package/dist/ui/internal/queryEngine.ts +124 -132
  75. package/dist/ui/internal/runSocket.ts +59 -0
  76. package/dist/ui/internal/sidebar.svelte.js +18 -0
  77. package/dist/ui/internal/telemetry.ts +52 -17
  78. package/dist/ui/internal/types.d.ts +7 -0
  79. package/dist/ui/web.js +55 -13
  80. package/package.json +40 -41
  81. package/dist/docs/agent-instructions.md +0 -18
  82. package/dist/docs/base.md +0 -98
  83. package/dist/docs/cli.md +0 -22
  84. package/dist/docs/graphene.md +0 -1462
  85. package/dist/ui/component-utilities/autoFormatting.js +0 -301
  86. package/dist/ui/component-utilities/builtInFormats.js +0 -482
  87. package/dist/ui/component-utilities/chartContext.js +0 -12
  88. package/dist/ui/component-utilities/chartWindowDebug.js +0 -21
  89. package/dist/ui/component-utilities/checkInputs.js +0 -95
  90. package/dist/ui/component-utilities/convert.js +0 -15
  91. package/dist/ui/component-utilities/dateParsing.js +0 -57
  92. package/dist/ui/component-utilities/dropdownContext.ts +0 -1
  93. package/dist/ui/component-utilities/echarts.js +0 -272
  94. package/dist/ui/component-utilities/echartsThemes.js +0 -453
  95. package/dist/ui/component-utilities/formatTitle.js +0 -24
  96. package/dist/ui/component-utilities/formatting.js +0 -250
  97. package/dist/ui/component-utilities/getColumnExtents.js +0 -79
  98. package/dist/ui/component-utilities/getColumnSummary.js +0 -67
  99. package/dist/ui/component-utilities/getCompletedData.js +0 -114
  100. package/dist/ui/component-utilities/getDistinctCount.js +0 -7
  101. package/dist/ui/component-utilities/getDistinctValues.js +0 -15
  102. package/dist/ui/component-utilities/getSeriesConfig.js +0 -237
  103. package/dist/ui/component-utilities/getSortedData.js +0 -7
  104. package/dist/ui/component-utilities/getStackPercentages.js +0 -43
  105. package/dist/ui/component-utilities/getStackedData.js +0 -17
  106. package/dist/ui/component-utilities/getYAxisIndex.js +0 -15
  107. package/dist/ui/component-utilities/globalContexts.js +0 -1
  108. package/dist/ui/component-utilities/helpers/getCompletedData.helpers.js +0 -119
  109. package/dist/ui/component-utilities/replaceNulls.js +0 -14
  110. package/dist/ui/component-utilities/tableUtils.ts +0 -120
  111. package/dist/ui/components/Area.svelte +0 -214
  112. package/dist/ui/components/Bar.svelte +0 -350
  113. package/dist/ui/components/Chart.svelte +0 -989
  114. package/dist/ui/components/ErrorChart.svelte +0 -118
  115. package/dist/ui/components/Line.svelte +0 -227
  116. package/dist/ui/internal/NavSidebar.svelte +0 -396
  117. package/dist/ui/internal/PageError.svelte +0 -23
  118. package/dist/ui/internal/checkSocket.ts +0 -48
  119. package/dist/ui/internal/theme.ts +0 -88
  120. package/dist/ui/public/inter-latin-ext.woff2 +0 -0
  121. package/dist/ui/public/inter-latin.woff2 +0 -0
@@ -1,272 +0,0 @@
1
- import {registerTheme, init, connect} from 'echarts/dist/echarts.esm.js'
2
- import {evidenceThemeDark, evidenceThemeLight} from './echartsThemes'
3
- import * as chartWindowDebug from './chartWindowDebug'
4
-
5
- /**
6
- * @typedef {import("echarts").EChartsOption & {
7
- * onclick?: (params: any) => void;
8
- * showAllXAxisLabels?: boolean;
9
- * theme: 'light' | 'dark';
10
- * }
11
- * } EChartsActionOptions
12
- */
13
-
14
- const ANIMATION_DURATION = 0
15
- const pendingChartsKey = Symbol.for('graphene.pendingCharts')
16
-
17
- /** @returns {Set<number> | null} */
18
- const getPendingCharts = () => {
19
- if (typeof window === 'undefined') return null
20
- window[pendingChartsKey] ??= new Set()
21
- return window[pendingChartsKey]
22
- }
23
-
24
- /** @param {number} chartId */
25
- const markChartPending = (chartId) => {
26
- let pending = getPendingCharts()
27
- if (!pending) return
28
- pending.add(chartId)
29
- }
30
-
31
- /** @param {number} chartId */
32
- const markChartFinished = (chartId) => {
33
- let pending = getPendingCharts()
34
- if (!pending) return
35
- pending.delete(chartId)
36
- }
37
-
38
- /** @param {HTMLElement} node */
39
- /** @param {EChartsActionOptions} options */
40
- const echartsAction = (node, options) => {
41
- // https://github.com/evidence-dev/evidence/issues/1323
42
- let useSvg =
43
- ['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(
44
- navigator.platform,
45
- // ios breaks w/ canvas if the canvas is too large
46
- ) && node.clientWidth * 3 * node.clientHeight * 3 > 16777215
47
-
48
- registerTheme('light', evidenceThemeLight)
49
- registerTheme('dark', evidenceThemeDark)
50
-
51
- let chart
52
-
53
- let initChart = () => {
54
- chart = init(node, options.theme, {
55
- renderer: useSvg ? 'svg' : (options.renderer ?? 'canvas'),
56
- })
57
- markChartPending(chart.id)
58
- chart.on('finished', () => markChartFinished(chart.id))
59
- }
60
-
61
- initChart()
62
-
63
- chartWindowDebug.set(chart.id, chart)
64
-
65
- // If connectGroup supplied, connect chart to other charts matching that connectGroup
66
- if (options.connectGroup) {
67
- chart.group = options.connectGroup
68
- connect(options.connectGroup)
69
- }
70
-
71
- // This function applies overrides to the echarts config generated by our chart components.
72
- // In cases where these affect the spacing of the chart, some jumping/reanimation will be visible when
73
- // the chart is animated. This is because we need to pass the initial options without the overrides to echarts
74
- // first in order to use setOption()'s built-in merge capability. I believe the only way around this is
75
- // to handle the option merge ourselves, then pass the final config object to setOption().
76
-
77
- // Series Color override
78
- let applySeriesColors = () => {
79
- if (options.seriesColors) {
80
- /** @type {import("echarts").EChartsOption} */
81
- let prevOption = chart.getOption()
82
- if (!prevOption) return
83
- let newOption = {...prevOption}
84
- for (let seriesName of Object.keys(options.seriesColors)) {
85
- let matchingSeriesIndex = prevOption.series.findIndex((s) => s.name === seriesName)
86
- if (matchingSeriesIndex !== -1) {
87
- newOption.series[matchingSeriesIndex] = {
88
- ...newOption.series[matchingSeriesIndex],
89
- itemStyle: {
90
- ...newOption.series[matchingSeriesIndex].itemStyle,
91
- color: options.seriesColors[seriesName],
92
- },
93
- }
94
- }
95
- }
96
- chart.setOption(newOption)
97
- }
98
- }
99
-
100
- // Check if echartsOptions are provided and apply them
101
- let applyEchartsOptions = () => {
102
- if (options.echartsOptions) {
103
- chart.setOption({
104
- ...options.echartsOptions,
105
- })
106
- }
107
- }
108
-
109
- // seriesOptions - loop through series and apply same changes to each
110
- let applySeriesOptions = () => {
111
- let tempSeries = []
112
- if (options.seriesOptions) {
113
- let reference_index = options.config.series.reduce(
114
- (acc, {evidenceSeriesType}, reference_index) => {
115
- if (
116
- evidenceSeriesType === 'reference_line' ||
117
- evidenceSeriesType === 'reference_area' ||
118
- evidenceSeriesType === 'reference_point'
119
- ) {
120
- acc.push(reference_index)
121
- }
122
- return acc
123
- },
124
- [],
125
- )
126
-
127
- for (let i = 0; i < options.config.series.length; i++) {
128
- if (reference_index.includes(i)) {
129
- tempSeries.push({})
130
- } else {
131
- tempSeries.push({...options.seriesOptions})
132
- }
133
- }
134
- chart.setOption({series: tempSeries})
135
- }
136
- }
137
-
138
- // Initial options set:
139
- chart.setOption({
140
- ...options.config,
141
- animation: false,
142
- animationDuration: ANIMATION_DURATION,
143
- animationDurationUpdate: ANIMATION_DURATION,
144
- })
145
-
146
- applySeriesColors()
147
- applyEchartsOptions()
148
- applySeriesOptions()
149
-
150
- // Click event handler:
151
- chart.on('click', function (params) {
152
- options.onclick?.(params)
153
- })
154
-
155
- // watching parent element is necessary for charts within `Fullscreen` components
156
- let parentElement = node.parentElement
157
- let onWindowResize = debounce(() => {
158
- chart.resize({
159
- animation: {
160
- duration: ANIMATION_DURATION,
161
- },
162
- })
163
- updateLabelWidths()
164
- }, 100)
165
-
166
- let resizeObserver
167
- if (window.ResizeObserver && parentElement) {
168
- resizeObserver = new ResizeObserver(onWindowResize)
169
- resizeObserver.observe(parentElement)
170
- } else {
171
- window.addEventListener('resize', onWindowResize)
172
- }
173
-
174
- // Label width setting:
175
- let updateLabelWidths = () => {
176
- if (options.showAllXAxisLabels) {
177
- // Make sure we operate on an up-to-date options object
178
- /** @type {import("echarts").EChartsOption} */
179
- let prevOption = chart.getOption()
180
- if (!prevOption) return
181
- // If the options object includes showing all x axis labels
182
- // Note: this isn't a standard option, but right now this is the easiest way to pass something to the action.
183
- // We don't want to have multiple resize observers if we can avoid it, and this is all due for a cleanup anyways
184
- // Get all the possible x values
185
- let distinctXValues = new Set(prevOption.series.flatMap((s) => s.data?.map((d) => d[0])))
186
- let modConst = 4 / 5
187
- let clientWidth = node?.clientWidth ?? 0
188
-
189
- // We disable this behavior because it doesn't make sense on horizontal bar charts
190
- // Category labels will grow to be visible
191
- // Value labels are interpolatable anyway
192
- if (!options.swapXY) {
193
- /** @type {import("echarts").EChartsOption} */
194
- let newOption = {
195
- xAxis: {
196
- axisLabel: {
197
- interval: 0,
198
- overflow: options.xAxisLabelOverflow,
199
- width: (clientWidth * modConst) / distinctXValues.size,
200
- },
201
- },
202
- }
203
- chart.setOption(newOption)
204
- }
205
- }
206
- }
207
-
208
- /** @param {EChartsActionOptions} newOptions */
209
- let updateChart = (newOptions) => {
210
- if (newOptions.theme !== options.theme) {
211
- chart.dispose()
212
- options = newOptions
213
- initChart()
214
- }
215
-
216
- options = newOptions
217
- markChartPending(chart.id)
218
- chart.setOption(
219
- {
220
- ...options.config,
221
- animation: false,
222
- animationDuration: ANIMATION_DURATION,
223
- animationDurationUpdate: ANIMATION_DURATION,
224
- },
225
- true,
226
- )
227
- applySeriesColors()
228
- applyEchartsOptions()
229
- applySeriesOptions()
230
- markChartPending(chart.id)
231
- chart.resize({
232
- animation: {
233
- duration: ANIMATION_DURATION,
234
- },
235
- })
236
- updateLabelWidths()
237
- }
238
-
239
- onWindowResize()
240
-
241
- window[Symbol.for('chart renders')] ??= 0
242
- window[Symbol.for('chart renders')]++
243
- return {
244
- update (options) {
245
- window[Symbol.for('chart renders')]++
246
- updateChart(options)
247
- },
248
- destroy () {
249
- if (resizeObserver) {
250
- resizeObserver.unobserve(parentElement)
251
- } else {
252
- window.removeEventListener('resize', onWindowResize)
253
- }
254
- markChartFinished(chart.id)
255
- chart.dispose()
256
-
257
- chartWindowDebug.unset(chart.id)
258
- },
259
- }
260
- }
261
-
262
- const debounce = (callback, wait) => {
263
- let timeoutId = null
264
- return (...args) => {
265
- window.clearTimeout(timeoutId)
266
- timeoutId = window.setTimeout(() => {
267
- callback(...args)
268
- }, wait)
269
- }
270
- }
271
-
272
- export default echartsAction
@@ -1,453 +0,0 @@
1
- import {themes} from '../internal/theme'
2
-
3
- /** @param {'light' | 'dark'} mode */
4
- const createTheme = (mode) => {
5
- let axisBaselineColor = themes[mode].colors['base-content-muted']
6
- let axisTickColor = themes[mode].colors['base-content-muted']
7
- let axisLabelColor = themes[mode].colors['base-content-muted']
8
- let gridlineColor = themes[mode].colors['base-300']
9
- let axisTitleBackgroundColor = themes[mode].colors['base-100']
10
- let legendTextColor = themes[mode].colors['base-content-muted']
11
- let legendPageIconColor = themes[mode].colors['base-content-muted']
12
- let legendPageTextColor = themes[mode].colors['base-content-muted']
13
- let tooltipBorderColor = themes[mode].colors['base-300']
14
- let tooltipBackgroundColor = themes[mode].colors['base-100']
15
- let tooltipTextColor = themes[mode].colors['base-content']
16
- let titleColor = themes[mode].colors['base-heading']
17
- let subtitleColor = themes[mode].colors['base-content-muted']
18
-
19
- return {
20
- darkMode: mode === 'dark', // if true, echarts will automatically update the font colour to work better on dark background
21
- backgroundColor: themes[mode].colors['base-100'],
22
- textStyle: {
23
- fontFamily: ['Inter', 'sans-serif'],
24
- },
25
- grid: {
26
- left: '1%',
27
- right: '4%',
28
- bottom: '0%',
29
- top: '15%',
30
- containLabel: true,
31
- },
32
- color: themes[mode].colorPalettes.default,
33
- title: {
34
- padding: 0,
35
- itemGap: 7,
36
- textStyle: {
37
- fontSize: 14,
38
- fontWeight: 600,
39
- color: titleColor,
40
- },
41
- subtextStyle: {
42
- fontSize: 13,
43
- color: subtitleColor,
44
- overflow: 'break',
45
- },
46
- top: '1px',
47
- },
48
- line: {
49
- itemStyle: {
50
- borderWidth: 0,
51
- },
52
- lineStyle: {
53
- width: 2,
54
- join: 'round',
55
- },
56
- symbolSize: 0,
57
- symbol: 'circle',
58
- smooth: false,
59
- },
60
- radar: {
61
- itemStyle: {
62
- borderWidth: 0,
63
- },
64
- lineStyle: {
65
- width: 2,
66
- },
67
- symbolSize: 0,
68
- symbol: 'circle',
69
- smooth: false,
70
- },
71
- pie: {
72
- itemStyle: {
73
- borderWidth: 0,
74
- borderColor: '#cccccc',
75
- },
76
- },
77
- scatter: {
78
- itemStyle: {
79
- borderWidth: 0,
80
- borderColor: '#cccccc',
81
- },
82
- },
83
- boxplot: {
84
- itemStyle: {
85
- borderWidth: 1.5,
86
- // borderColor: '#cccccc'
87
- },
88
- },
89
- parallel: {
90
- itemStyle: {
91
- borderWidth: 0,
92
- borderColor: '#cccccc',
93
- },
94
- },
95
- sankey: {
96
- itemStyle: {
97
- borderWidth: 0,
98
- borderColor: '#cccccc',
99
- },
100
- },
101
- funnel: {
102
- itemStyle: {
103
- borderWidth: 0,
104
- borderColor: '#cccccc',
105
- },
106
- },
107
- gauge: {
108
- itemStyle: {
109
- borderWidth: 0,
110
- borderColor: '#cccccc',
111
- },
112
- },
113
- candlestick: {
114
- itemStyle: {
115
- color: '#eb5454',
116
- color0: '#47b262',
117
- borderColor: '#eb5454',
118
- borderColor0: '#47b262',
119
- borderWidth: 1,
120
- },
121
- },
122
- graph: {
123
- itemStyle: {
124
- borderWidth: 0,
125
- borderColor: '#cccccc',
126
- },
127
- lineStyle: {
128
- width: 1,
129
- color: '#aaaaaa',
130
- },
131
- symbolSize: 0,
132
- symbol: 'circle',
133
- smooth: false,
134
- color: [
135
- '#923d59',
136
- '#488f96',
137
- '#518eca',
138
- '#b3a9a0',
139
- '#ffc857',
140
- '#495867',
141
- '#bfdbf7',
142
- '#bc4749',
143
- '#eeebd0',
144
- ],
145
- label: {
146
- color: '#f2f2f2',
147
- },
148
- },
149
- map: {
150
- itemStyle: {
151
- areaColor: '#eee',
152
- borderColor: '#444',
153
- borderWidth: 0.5,
154
- },
155
- label: {
156
- color: '#000',
157
- },
158
- emphasis: {
159
- itemStyle: {
160
- areaColor: 'rgba(255,215,0,0.8)',
161
- borderColor: '#444',
162
- borderWidth: 1,
163
- },
164
- label: {
165
- color: 'rgb(100,0,0)',
166
- },
167
- },
168
- },
169
- geo: {
170
- itemStyle: {
171
- areaColor: '#eee',
172
- borderColor: '#444',
173
- borderWidth: 0.5,
174
- },
175
- label: {
176
- color: '#000',
177
- },
178
- emphasis: {
179
- itemStyle: {
180
- areaColor: 'rgba(255,215,0,0.8)',
181
- borderColor: '#444',
182
- borderWidth: 1,
183
- },
184
- label: {
185
- color: 'rgb(100,0,0)',
186
- },
187
- },
188
- },
189
- categoryAxis: {
190
- axisLine: {
191
- show: true,
192
- lineStyle: {
193
- color: axisBaselineColor,
194
- },
195
- },
196
- axisTick: {
197
- show: false,
198
- lineStyle: {
199
- color: axisTickColor,
200
- },
201
- length: 3,
202
- alignWithLabel: true,
203
- },
204
- axisLabel: {
205
- show: true,
206
- color: axisLabelColor,
207
- },
208
- splitLine: {
209
- show: false,
210
- lineStyle: {
211
- color: [gridlineColor],
212
- },
213
- },
214
- splitArea: {
215
- show: false,
216
- areaStyle: {
217
- color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
218
- },
219
- },
220
- },
221
- valueAxis: {
222
- axisLine: {
223
- show: false,
224
- lineStyle: {
225
- color: axisBaselineColor,
226
- },
227
- },
228
- axisTick: {
229
- show: false,
230
- lineStyle: {
231
- color: axisTickColor,
232
- },
233
- length: 2,
234
- },
235
- axisLabel: {
236
- show: true,
237
- color: axisLabelColor,
238
- },
239
- splitLine: {
240
- show: true,
241
- lineStyle: {
242
- color: [gridlineColor],
243
- width: 1,
244
- },
245
- },
246
- splitArea: {
247
- show: false,
248
- areaStyle: {
249
- color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
250
- },
251
- },
252
- nameTextStyle: {
253
- backgroundColor: axisTitleBackgroundColor,
254
- },
255
- },
256
- logAxis: {
257
- axisLine: {
258
- show: false,
259
- lineStyle: {
260
- color: axisBaselineColor,
261
- },
262
- },
263
- axisTick: {
264
- show: false,
265
- lineStyle: {
266
- color: axisTickColor,
267
- },
268
- length: 2,
269
- },
270
- axisLabel: {
271
- show: true,
272
- color: axisLabelColor,
273
- },
274
- splitLine: {
275
- show: true,
276
- lineStyle: {
277
- color: [gridlineColor],
278
- },
279
- },
280
- splitArea: {
281
- show: false,
282
- areaStyle: {
283
- color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
284
- },
285
- },
286
- nameTextStyle: {
287
- backgroundColor: axisTitleBackgroundColor,
288
- },
289
- },
290
- timeAxis: {
291
- axisLine: {
292
- show: true,
293
- lineStyle: {
294
- color: axisBaselineColor,
295
- },
296
- },
297
- axisTick: {
298
- show: true,
299
- lineStyle: {
300
- color: axisTickColor,
301
- },
302
- length: 3,
303
- },
304
- axisLabel: {
305
- show: true,
306
- color: axisLabelColor,
307
- },
308
- splitLine: {
309
- show: false,
310
- lineStyle: {
311
- color: [gridlineColor],
312
- },
313
- },
314
- splitArea: {
315
- show: false,
316
- areaStyle: {
317
- color: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
318
- },
319
- },
320
- },
321
- toolbox: {
322
- iconStyle: {
323
- borderColor: '#999999',
324
- },
325
- emphasis: {
326
- iconStyle: {
327
- borderColor: '#459cde',
328
- },
329
- },
330
- },
331
- legend: {
332
- textStyle: {
333
- padding: [0, 0, 0, -7],
334
- color: legendTextColor,
335
- },
336
- // "padding": [15,0,0,0],
337
- icon: 'circle',
338
- pageIcons: {
339
- horizontal: [
340
- 'M 17 3 h 2 c 0.386 0 0.738 0.223 0.904 0.572 s 0.115 0.762 -0.13 1.062 L 11.292 15 l 8.482 10.367 c 0.245 0.299 0.295 0.712 0.13 1.062 S 19.386 27 19 27 h -2 c -0.3 0 -0.584 -0.135 -0.774 -0.367 l -9 -11 c -0.301 -0.369 -0.301 -0.898 0 -1.267 l 9 -11 C 16.416 3.135 16.7 3 17 3 Z',
341
- 'M 12 27 h -2 c -0.386 0 -0.738 -0.223 -0.904 -0.572 s -0.115 -0.762 0.13 -1.062 L 17.708 15 L 9.226 4.633 c -0.245 -0.299 -0.295 -0.712 -0.13 -1.062 S 9.614 3 10 3 h 2 c 0.3 0 0.584 0.135 0.774 0.367 l 9 11 c 0.301 0.369 0.301 0.898 0 1.267 l -9 11 C 12.584 26.865 12.3 27 12 27 Z',
342
- ],
343
- },
344
- pageIconColor: legendPageIconColor,
345
- pageIconSize: 12,
346
- pageTextStyle: {
347
- color: legendPageTextColor,
348
- },
349
- pageButtonItemGap: -2,
350
- animationDurationUpdate: 300,
351
- },
352
- tooltip: {
353
- axisPointer: {
354
- lineStyle: {
355
- color: '#cccccc',
356
- width: 1,
357
- },
358
- crossStyle: {
359
- color: '#cccccc',
360
- width: 1,
361
- },
362
- },
363
- borderRadius: 4,
364
- borderWidth: 1,
365
- borderColor: tooltipBorderColor,
366
- backgroundColor: tooltipBackgroundColor,
367
- textStyle: {
368
- color: tooltipTextColor,
369
- fontSize: 12,
370
- fontWeight: 400,
371
- },
372
- padding: 6,
373
- },
374
- timeline: {
375
- lineStyle: {
376
- color: '#e3e3e3',
377
- width: 2,
378
- },
379
- itemStyle: {
380
- color: '#d6d6d6',
381
- borderWidth: 1,
382
- },
383
- controlStyle: {
384
- color: '#bfbfbf',
385
- borderColor: '#bfbfbf',
386
- borderWidth: 1,
387
- },
388
- checkpointStyle: {
389
- color: '#8f8f8f',
390
- borderColor: '#ffffff',
391
- },
392
- label: {
393
- color: '#c9c9c9',
394
- },
395
- emphasis: {
396
- itemStyle: {
397
- color: '#9c9c9c',
398
- },
399
- controlStyle: {
400
- color: '#bfbfbf',
401
- borderColor: '#bfbfbf',
402
- borderWidth: 1,
403
- },
404
- label: {
405
- color: '#c9c9c9',
406
- },
407
- },
408
- },
409
- visualMap: {
410
- color: ['#c41621', '#e39588', '#f5ed98'],
411
- },
412
- dataZoom: {
413
- type: 'slider',
414
- bottom: 10,
415
- height: 30,
416
- showDetail: false,
417
- handleSize: '80%',
418
- borderColor: gridlineColor,
419
- handleStyle: {
420
- borderColor: gridlineColor,
421
- color: gridlineColor,
422
- },
423
- moveHandleStyle: {
424
- borderColor: gridlineColor,
425
- color: gridlineColor,
426
- },
427
- textStyle: {},
428
- emphasis: {
429
- handleStyle: {
430
- borderColor: gridlineColor,
431
- color: gridlineColor,
432
- },
433
- moveHandleStyle: {
434
- borderColor: gridlineColor,
435
- color: gridlineColor,
436
- },
437
- },
438
- },
439
- markPoint: {
440
- label: {
441
- color: '#f2f2f2',
442
- },
443
- emphasis: {
444
- label: {
445
- color: '#f2f2f2',
446
- },
447
- },
448
- },
449
- }
450
- }
451
-
452
- export const evidenceThemeLight = createTheme('light')
453
- export const evidenceThemeDark = createTheme('dark')