@helioviewer/superset-plugin-chart-big-calendar 3.0.1 → 3.0.3
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.
- package/esm/SupersetPluginChartBigCalendar.js +16 -1
- package/esm/plugin/controlPanel.js +18 -0
- package/esm/plugin/transformProps.js +4 -0
- package/lib/SupersetPluginChartBigCalendar.d.ts.map +1 -1
- package/lib/SupersetPluginChartBigCalendar.js +16 -1
- package/lib/plugin/controlPanel.d.ts.map +1 -1
- package/lib/plugin/controlPanel.js +18 -0
- package/lib/plugin/transformProps.d.ts +2 -0
- package/lib/plugin/transformProps.d.ts.map +1 -1
- package/lib/plugin/transformProps.js +4 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -133,6 +133,12 @@ export default function SupersetPluginChartBigCalendar(props) {
|
|
|
133
133
|
xAxis: {
|
|
134
134
|
type: 'category',
|
|
135
135
|
data: xAxisData,
|
|
136
|
+
name: props.xAxisLabel || 'Month',
|
|
137
|
+
nameLocation: 'middle',
|
|
138
|
+
nameGap: 40,
|
|
139
|
+
nameTextStyle: {
|
|
140
|
+
color: axisLabelColor
|
|
141
|
+
},
|
|
136
142
|
axisLabel: {
|
|
137
143
|
rotate: parseInt(props.xAxisAngle),
|
|
138
144
|
color: axisLabelColor
|
|
@@ -142,6 +148,12 @@ export default function SupersetPluginChartBigCalendar(props) {
|
|
|
142
148
|
type: 'category',
|
|
143
149
|
data: Array.from(Array(31).keys()).map(n => n + 1).reverse(),
|
|
144
150
|
// Returns [1, 2, 3, 4, ..., 31]
|
|
151
|
+
name: props.yAxisLabel || 'Day of Month',
|
|
152
|
+
nameLocation: 'middle',
|
|
153
|
+
nameGap: 40,
|
|
154
|
+
nameTextStyle: {
|
|
155
|
+
color: axisLabelColor
|
|
156
|
+
},
|
|
145
157
|
axisLabel: {
|
|
146
158
|
color: axisLabelColor
|
|
147
159
|
}
|
|
@@ -154,7 +166,10 @@ export default function SupersetPluginChartBigCalendar(props) {
|
|
|
154
166
|
orient: 'horizontal',
|
|
155
167
|
left: 'center',
|
|
156
168
|
top: 0,
|
|
157
|
-
backgroundColor: props.legendBackgroundColor ? `rgba(${props.legendBackgroundColor.r}, ${props.legendBackgroundColor.g}, ${props.legendBackgroundColor.b}, ${props.legendBackgroundColor.a})` : 'rgba(238, 238, 238, 1)',
|
|
169
|
+
backgroundColor: props.legendBackgroundColor ? `rgba(${props.legendBackgroundColor.r}, ${props.legendBackgroundColor.g}, ${props.legendBackgroundColor.b}, ${props.legendBackgroundColor.a})` : isDarkMode ? 'rgba(50, 50, 50, 1)' : 'rgba(238, 238, 238, 1)',
|
|
170
|
+
textStyle: {
|
|
171
|
+
color: axisLabelColor
|
|
172
|
+
},
|
|
158
173
|
padding: parseInt(props.legendPadding) || 5,
|
|
159
174
|
inRange: {
|
|
160
175
|
color: props.colorRange ? props.colorRange.map(v => `rgba(${v.r}, ${v.g}, ${v.b}, ${v.a})`) : ['rgba(173, 216, 230, 1)', 'rgba(135, 206, 235, 1)', 'rgba(0, 191, 255, 1)', 'rgba(30, 144, 255, 1)', 'rgba(0, 0, 255, 1)']
|
|
@@ -122,6 +122,24 @@ const config = {
|
|
|
122
122
|
expanded: true,
|
|
123
123
|
tabOverride: 'customize',
|
|
124
124
|
controlSetRows: [[{
|
|
125
|
+
name: 'x_axis_label',
|
|
126
|
+
config: {
|
|
127
|
+
type: 'TextControl',
|
|
128
|
+
default: 'Month',
|
|
129
|
+
renderTrigger: true,
|
|
130
|
+
label: t('X-Axis Label'),
|
|
131
|
+
description: t('Label for the X-Axis')
|
|
132
|
+
}
|
|
133
|
+
}], [{
|
|
134
|
+
name: 'y_axis_label',
|
|
135
|
+
config: {
|
|
136
|
+
type: 'TextControl',
|
|
137
|
+
default: 'Day of Month',
|
|
138
|
+
renderTrigger: true,
|
|
139
|
+
label: t('Y-Axis Label'),
|
|
140
|
+
description: t('Label for the Y-Axis')
|
|
141
|
+
}
|
|
142
|
+
}], [{
|
|
125
143
|
name: 'x_axis_angle',
|
|
126
144
|
config: {
|
|
127
145
|
type: 'TextControl',
|
|
@@ -54,6 +54,8 @@ export default function transformProps(chartProps) {
|
|
|
54
54
|
queriesData
|
|
55
55
|
} = chartProps;
|
|
56
56
|
const {
|
|
57
|
+
xAxisLabel,
|
|
58
|
+
yAxisLabel,
|
|
57
59
|
xAxisAngle,
|
|
58
60
|
colorRange,
|
|
59
61
|
rangeType,
|
|
@@ -66,6 +68,8 @@ export default function transformProps(chartProps) {
|
|
|
66
68
|
width,
|
|
67
69
|
height,
|
|
68
70
|
data,
|
|
71
|
+
xAxisLabel,
|
|
72
|
+
yAxisLabel,
|
|
69
73
|
xAxisAngle,
|
|
70
74
|
colorRange,
|
|
71
75
|
rangeType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupersetPluginChartBigCalendar.d.ts","sourceRoot":"","sources":["../src/SupersetPluginChartBigCalendar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,mCAAmC,EAA6C,MAAM,SAAS,CAAC;AAuEzG,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,KAAK,EAAE,mCAAmC,
|
|
1
|
+
{"version":3,"file":"SupersetPluginChartBigCalendar.d.ts","sourceRoot":"","sources":["../src/SupersetPluginChartBigCalendar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,mCAAmC,EAA6C,MAAM,SAAS,CAAC;AAuEzG,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,KAAK,EAAE,mCAAmC,qBAgHhG"}
|
|
@@ -137,6 +137,12 @@ function SupersetPluginChartBigCalendar(props) {
|
|
|
137
137
|
xAxis: {
|
|
138
138
|
type: 'category',
|
|
139
139
|
data: xAxisData,
|
|
140
|
+
name: props.xAxisLabel || 'Month',
|
|
141
|
+
nameLocation: 'middle',
|
|
142
|
+
nameGap: 40,
|
|
143
|
+
nameTextStyle: {
|
|
144
|
+
color: axisLabelColor
|
|
145
|
+
},
|
|
140
146
|
axisLabel: {
|
|
141
147
|
rotate: parseInt(props.xAxisAngle),
|
|
142
148
|
color: axisLabelColor
|
|
@@ -146,6 +152,12 @@ function SupersetPluginChartBigCalendar(props) {
|
|
|
146
152
|
type: 'category',
|
|
147
153
|
data: Array.from(Array(31).keys()).map(n => n + 1).reverse(),
|
|
148
154
|
// Returns [1, 2, 3, 4, ..., 31]
|
|
155
|
+
name: props.yAxisLabel || 'Day of Month',
|
|
156
|
+
nameLocation: 'middle',
|
|
157
|
+
nameGap: 40,
|
|
158
|
+
nameTextStyle: {
|
|
159
|
+
color: axisLabelColor
|
|
160
|
+
},
|
|
149
161
|
axisLabel: {
|
|
150
162
|
color: axisLabelColor
|
|
151
163
|
}
|
|
@@ -158,7 +170,10 @@ function SupersetPluginChartBigCalendar(props) {
|
|
|
158
170
|
orient: 'horizontal',
|
|
159
171
|
left: 'center',
|
|
160
172
|
top: 0,
|
|
161
|
-
backgroundColor: props.legendBackgroundColor ? `rgba(${props.legendBackgroundColor.r}, ${props.legendBackgroundColor.g}, ${props.legendBackgroundColor.b}, ${props.legendBackgroundColor.a})` : 'rgba(238, 238, 238, 1)',
|
|
173
|
+
backgroundColor: props.legendBackgroundColor ? `rgba(${props.legendBackgroundColor.r}, ${props.legendBackgroundColor.g}, ${props.legendBackgroundColor.b}, ${props.legendBackgroundColor.a})` : isDarkMode ? 'rgba(50, 50, 50, 1)' : 'rgba(238, 238, 238, 1)',
|
|
174
|
+
textStyle: {
|
|
175
|
+
color: axisLabelColor
|
|
176
|
+
},
|
|
162
177
|
padding: parseInt(props.legendPadding) || 5,
|
|
163
178
|
inRange: {
|
|
164
179
|
color: props.colorRange ? props.colorRange.map(v => `rgba(${v.r}, ${v.g}, ${v.b}, ${v.a})`) : ['rgba(173, 216, 230, 1)', 'rgba(135, 206, 235, 1)', 'rgba(0, 191, 255, 1)', 'rgba(30, 144, 255, 1)', 'rgba(0, 0, 255, 1)']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controlPanel.d.ts","sourceRoot":"","sources":["../../src/plugin/controlPanel.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,kBAAkB,EAEnB,MAAM,6BAA6B,CAAC;AAErC,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"controlPanel.d.ts","sourceRoot":"","sources":["../../src/plugin/controlPanel.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,kBAAkB,EAEnB,MAAM,6BAA6B,CAAC;AAErC,QAAA,MAAM,MAAM,EAAE,kBAuPb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -125,6 +125,24 @@ const config = {
|
|
|
125
125
|
expanded: true,
|
|
126
126
|
tabOverride: 'customize',
|
|
127
127
|
controlSetRows: [[{
|
|
128
|
+
name: 'x_axis_label',
|
|
129
|
+
config: {
|
|
130
|
+
type: 'TextControl',
|
|
131
|
+
default: 'Month',
|
|
132
|
+
renderTrigger: true,
|
|
133
|
+
label: (0, _core.t)('X-Axis Label'),
|
|
134
|
+
description: (0, _core.t)('Label for the X-Axis')
|
|
135
|
+
}
|
|
136
|
+
}], [{
|
|
137
|
+
name: 'y_axis_label',
|
|
138
|
+
config: {
|
|
139
|
+
type: 'TextControl',
|
|
140
|
+
default: 'Day of Month',
|
|
141
|
+
renderTrigger: true,
|
|
142
|
+
label: (0, _core.t)('Y-Axis Label'),
|
|
143
|
+
description: (0, _core.t)('Label for the Y-Axis')
|
|
144
|
+
}
|
|
145
|
+
}], [{
|
|
128
146
|
name: 'x_axis_angle',
|
|
129
147
|
config: {
|
|
130
148
|
type: 'TextControl',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformProps.d.ts","sourceRoot":"","sources":["../../src/plugin/transformProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAErE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,UAAU,EAAE,UAAU
|
|
1
|
+
{"version":3,"file":"transformProps.d.ts","sourceRoot":"","sources":["../../src/plugin/transformProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAErE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,UAAU,EAAE,UAAU;;;;;;;;;;;;EA+C5D"}
|
|
@@ -58,6 +58,8 @@ function transformProps(chartProps) {
|
|
|
58
58
|
queriesData
|
|
59
59
|
} = chartProps;
|
|
60
60
|
const {
|
|
61
|
+
xAxisLabel,
|
|
62
|
+
yAxisLabel,
|
|
61
63
|
xAxisAngle,
|
|
62
64
|
colorRange,
|
|
63
65
|
rangeType,
|
|
@@ -70,6 +72,8 @@ function transformProps(chartProps) {
|
|
|
70
72
|
width,
|
|
71
73
|
height,
|
|
72
74
|
data,
|
|
75
|
+
xAxisLabel,
|
|
76
|
+
yAxisLabel,
|
|
73
77
|
xAxisAngle,
|
|
74
78
|
colorRange,
|
|
75
79
|
rangeType,
|
package/lib/types.d.ts
CHANGED
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACL,aAAa,EACb,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,yCAAyC;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,4CAA4C;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU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