mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: make TS enums strictly PascalCase (#26875)
This commit is contained in:
@@ -45,9 +45,9 @@ export default class EchartsAreaChartPlugin extends EchartsChartPlugin<
|
||||
loadChart: () => import('../EchartsTimeseries'),
|
||||
metadata: {
|
||||
behaviors: [
|
||||
Behavior.INTERACTIVE_CHART,
|
||||
Behavior.DRILL_TO_DETAIL,
|
||||
Behavior.DRILL_BY,
|
||||
Behavior.InteractiveChart,
|
||||
Behavior.DrillToDetail,
|
||||
Behavior.DrillBy,
|
||||
],
|
||||
category: t('Evolution'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
|
||||
@@ -173,7 +173,7 @@ export default function EchartsTimeseries({
|
||||
...(eventParams.name ? [eventParams.name] : []),
|
||||
...(labelMap[seriesName] ?? []),
|
||||
];
|
||||
if (data && xAxis.type === AxisType.time) {
|
||||
if (data && xAxis.type === AxisType.Time) {
|
||||
drillToDetailFilters.push({
|
||||
col:
|
||||
// if the xAxis is '__timestamp', granularity_sqla will be the column of filter
|
||||
@@ -187,7 +187,7 @@ export default function EchartsTimeseries({
|
||||
});
|
||||
}
|
||||
[
|
||||
...(xAxis.type === AxisType.category && data ? [xAxis.label] : []),
|
||||
...(xAxis.type === AxisType.Category && data ? [xAxis.label] : []),
|
||||
...formData.groupby,
|
||||
].forEach((dimension, i) =>
|
||||
drillToDetailFilters.push({
|
||||
|
||||
@@ -59,9 +59,9 @@ const {
|
||||
function createAxisTitleControl(axis: 'x' | 'y'): ControlSetRow[] {
|
||||
const isXAxis = axis === 'x';
|
||||
const isVertical = (controls: ControlStateMapping) =>
|
||||
Boolean(controls?.orientation.value === OrientationType.vertical);
|
||||
Boolean(controls?.orientation.value === OrientationType.Vertical);
|
||||
const isHorizontal = (controls: ControlStateMapping) =>
|
||||
Boolean(controls?.orientation.value === OrientationType.horizontal);
|
||||
Boolean(controls?.orientation.value === OrientationType.Horizontal);
|
||||
return [
|
||||
[
|
||||
{
|
||||
@@ -148,9 +148,9 @@ function createAxisTitleControl(axis: 'x' | 'y'): ControlSetRow[] {
|
||||
function createAxisControl(axis: 'x' | 'y'): ControlSetRow[] {
|
||||
const isXAxis = axis === 'x';
|
||||
const isVertical = (controls: ControlStateMapping) =>
|
||||
Boolean(controls?.orientation.value === OrientationType.vertical);
|
||||
Boolean(controls?.orientation.value === OrientationType.Vertical);
|
||||
const isHorizontal = (controls: ControlStateMapping) =>
|
||||
Boolean(controls?.orientation.value === OrientationType.horizontal);
|
||||
Boolean(controls?.orientation.value === OrientationType.Horizontal);
|
||||
return [
|
||||
[
|
||||
{
|
||||
@@ -272,8 +272,8 @@ const config: ControlPanelConfig = {
|
||||
label: t('Bar orientation'),
|
||||
default: orientation,
|
||||
options: [
|
||||
[OrientationType.vertical, t('Vertical')],
|
||||
[OrientationType.horizontal, t('Horizontal')],
|
||||
[OrientationType.Vertical, t('Vertical')],
|
||||
[OrientationType.Horizontal, t('Horizontal')],
|
||||
],
|
||||
description: t('Orientation of bar chart'),
|
||||
},
|
||||
|
||||
@@ -51,9 +51,9 @@ export default class EchartsTimeseriesBarChartPlugin extends EchartsChartPlugin<
|
||||
loadChart: () => import('../../EchartsTimeseries'),
|
||||
metadata: {
|
||||
behaviors: [
|
||||
Behavior.INTERACTIVE_CHART,
|
||||
Behavior.DRILL_TO_DETAIL,
|
||||
Behavior.DRILL_BY,
|
||||
Behavior.InteractiveChart,
|
||||
Behavior.DrillToDetail,
|
||||
Behavior.DrillBy,
|
||||
],
|
||||
category: t('Evolution'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
|
||||
@@ -50,9 +50,9 @@ export default class EchartsTimeseriesLineChartPlugin extends EchartsChartPlugin
|
||||
loadChart: () => import('../../EchartsTimeseries'),
|
||||
metadata: {
|
||||
behaviors: [
|
||||
Behavior.INTERACTIVE_CHART,
|
||||
Behavior.DRILL_TO_DETAIL,
|
||||
Behavior.DRILL_BY,
|
||||
Behavior.InteractiveChart,
|
||||
Behavior.DrillToDetail,
|
||||
Behavior.DrillBy,
|
||||
],
|
||||
category: t('Evolution'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
|
||||
@@ -49,9 +49,9 @@ export default class EchartsTimeseriesScatterChartPlugin extends EchartsChartPlu
|
||||
loadChart: () => import('../../EchartsTimeseries'),
|
||||
metadata: {
|
||||
behaviors: [
|
||||
Behavior.INTERACTIVE_CHART,
|
||||
Behavior.DRILL_TO_DETAIL,
|
||||
Behavior.DRILL_BY,
|
||||
Behavior.InteractiveChart,
|
||||
Behavior.DrillToDetail,
|
||||
Behavior.DrillBy,
|
||||
],
|
||||
category: t('Evolution'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
|
||||
@@ -49,9 +49,9 @@ export default class EchartsTimeseriesSmoothLineChartPlugin extends EchartsChart
|
||||
loadChart: () => import('../../EchartsTimeseries'),
|
||||
metadata: {
|
||||
behaviors: [
|
||||
Behavior.INTERACTIVE_CHART,
|
||||
Behavior.DRILL_TO_DETAIL,
|
||||
Behavior.DRILL_BY,
|
||||
Behavior.InteractiveChart,
|
||||
Behavior.DrillToDetail,
|
||||
Behavior.DrillBy,
|
||||
],
|
||||
category: t('Evolution'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
|
||||
@@ -40,9 +40,9 @@ export default class EchartsTimeseriesStepChartPlugin extends EchartsChartPlugin
|
||||
loadChart: () => import('../EchartsTimeseries'),
|
||||
metadata: {
|
||||
behaviors: [
|
||||
Behavior.INTERACTIVE_CHART,
|
||||
Behavior.DRILL_TO_DETAIL,
|
||||
Behavior.DRILL_BY,
|
||||
Behavior.InteractiveChart,
|
||||
Behavior.DrillToDetail,
|
||||
Behavior.DrillBy,
|
||||
],
|
||||
category: t('Evolution'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
|
||||
@@ -69,7 +69,7 @@ export const DEFAULT_FORM_DATA: EchartsTimeseriesFormData = {
|
||||
showValue: false,
|
||||
onlyTotal: false,
|
||||
percentageThreshold: 0,
|
||||
orientation: OrientationType.vertical,
|
||||
orientation: OrientationType.Vertical,
|
||||
sort_series_type: 'sum',
|
||||
sort_series_ascending: false,
|
||||
};
|
||||
|
||||
@@ -39,9 +39,9 @@ export default class EchartsTimeseriesChartPlugin extends EchartsChartPlugin<
|
||||
loadChart: () => import('./EchartsTimeseries'),
|
||||
metadata: {
|
||||
behaviors: [
|
||||
Behavior.INTERACTIVE_CHART,
|
||||
Behavior.DRILL_TO_DETAIL,
|
||||
Behavior.DRILL_BY,
|
||||
Behavior.InteractiveChart,
|
||||
Behavior.DrillToDetail,
|
||||
Behavior.DrillBy,
|
||||
],
|
||||
category: t('Evolution'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
|
||||
@@ -204,7 +204,7 @@ export default function transformProps(
|
||||
) {
|
||||
xAxisLabel = verboseMap[xAxisLabel];
|
||||
}
|
||||
const isHorizontal = orientation === OrientationType.horizontal;
|
||||
const isHorizontal = orientation === OrientationType.Horizontal;
|
||||
const { totalStackedValues, thresholdValues } = extractDataTotalValues(
|
||||
rebasedData,
|
||||
{
|
||||
@@ -410,11 +410,11 @@ export default function transformProps(
|
||||
}
|
||||
|
||||
const tooltipFormatter =
|
||||
xAxisDataType === GenericDataType.TEMPORAL
|
||||
xAxisDataType === GenericDataType.Temporal
|
||||
? getTooltipTimeFormatter(tooltipTimeFormat)
|
||||
: String;
|
||||
const xAxisFormatter =
|
||||
xAxisDataType === GenericDataType.TEMPORAL
|
||||
xAxisDataType === GenericDataType.Temporal
|
||||
? getXAxisFormatter(xAxisTimeFormat)
|
||||
: String;
|
||||
|
||||
@@ -461,7 +461,7 @@ export default function transformProps(
|
||||
},
|
||||
minorTick: { show: minorTicks },
|
||||
minInterval:
|
||||
xAxisType === AxisType.time && timeGrainSqla
|
||||
xAxisType === AxisType.Time && timeGrainSqla
|
||||
? TIMEGRAIN_TO_TIMESTAMP[timeGrainSqla]
|
||||
: 0,
|
||||
...getMinAndMaxFromBounds(
|
||||
@@ -475,7 +475,7 @@ export default function transformProps(
|
||||
|
||||
let yAxis: any = {
|
||||
...defaultYAxis,
|
||||
type: logAxis ? AxisType.log : AxisType.value,
|
||||
type: logAxis ? AxisType.Log : AxisType.Value,
|
||||
min: yAxisMin,
|
||||
max: yAxisMax,
|
||||
minorTick: { show: minorTicks },
|
||||
|
||||
@@ -38,8 +38,8 @@ import {
|
||||
} from '../types';
|
||||
|
||||
export enum OrientationType {
|
||||
vertical = 'vertical',
|
||||
horizontal = 'horizontal',
|
||||
Vertical = 'vertical',
|
||||
Horizontal = 'horizontal',
|
||||
}
|
||||
|
||||
export enum EchartsTimeseriesSeriesType {
|
||||
|
||||
Reference in New Issue
Block a user