mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: Disables minor ticks by default (#26310)
This commit is contained in:
committed by
GitHub
parent
8c32c6da16
commit
eb65cea971
@@ -34,6 +34,7 @@ import { DEFAULT_FORM_DATA } from './types';
|
||||
import { EchartsTimeseriesSeriesType } from '../Timeseries/types';
|
||||
import {
|
||||
legendSection,
|
||||
minorTicks,
|
||||
richTooltipSection,
|
||||
truncateXAxis,
|
||||
xAxisBounds,
|
||||
@@ -316,6 +317,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
},
|
||||
],
|
||||
[minorTicks],
|
||||
...legendSection,
|
||||
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
|
||||
['x_axis_time_format'],
|
||||
|
||||
@@ -160,6 +160,7 @@ export default function transformProps(
|
||||
opacity,
|
||||
opacityB,
|
||||
minorSplitLine,
|
||||
minorTicks,
|
||||
seriesType,
|
||||
seriesTypeB,
|
||||
showLegend,
|
||||
@@ -499,6 +500,7 @@ export default function transformProps(
|
||||
formatter: xAxisFormatter,
|
||||
rotate: xAxisLabelRotation,
|
||||
},
|
||||
minorTick: { show: minorTicks },
|
||||
minInterval:
|
||||
xAxisType === 'time' && timeGrainSqla
|
||||
? TIMEGRAIN_TO_TIMESTAMP[timeGrainSqla]
|
||||
@@ -520,7 +522,7 @@ export default function transformProps(
|
||||
type: logAxis ? 'log' : 'value',
|
||||
min: yAxisMin,
|
||||
max: yAxisMax,
|
||||
minorTick: { show: true },
|
||||
minorTick: { show: minorTicks },
|
||||
minorSplitLine: { show: minorSplitLine },
|
||||
axisLabel: {
|
||||
formatter: getYAxisFormatter(
|
||||
@@ -541,7 +543,7 @@ export default function transformProps(
|
||||
type: logAxisSecondary ? 'log' : 'value',
|
||||
min: minSecondary,
|
||||
max: maxSecondary,
|
||||
minorTick: { show: true },
|
||||
minorTick: { show: minorTicks },
|
||||
splitLine: { show: false },
|
||||
minorSplitLine: { show: minorSplitLine },
|
||||
axisLabel: {
|
||||
|
||||
@@ -45,6 +45,7 @@ export type EchartsMixedTimeseriesFormData = QueryFormData & {
|
||||
annotationLayers: AnnotationLayer[];
|
||||
// shared properties
|
||||
minorSplitLine: boolean;
|
||||
minorTicks: boolean;
|
||||
logAxis: boolean;
|
||||
logAxisSecondary: boolean;
|
||||
yAxisFormat?: string;
|
||||
|
||||
@@ -40,6 +40,7 @@ import {
|
||||
xAxisLabelRotation,
|
||||
truncateXAxis,
|
||||
xAxisBounds,
|
||||
minorTicks,
|
||||
} from '../../controls';
|
||||
import { AreaChartStackControlOptions } from '../../constants';
|
||||
|
||||
@@ -169,6 +170,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
},
|
||||
],
|
||||
[minorTicks],
|
||||
[
|
||||
{
|
||||
name: 'zoomable',
|
||||
|
||||
@@ -32,6 +32,7 @@ import {
|
||||
} from '@superset-ui/chart-controls';
|
||||
import {
|
||||
legendSection,
|
||||
minorTicks,
|
||||
richTooltipSection,
|
||||
seriesOrderSection,
|
||||
showValueSection,
|
||||
@@ -299,6 +300,7 @@ const config: ControlPanelConfig = {
|
||||
...seriesOrderSection,
|
||||
['color_scheme'],
|
||||
...showValueSection,
|
||||
[minorTicks],
|
||||
[
|
||||
{
|
||||
name: 'zoomable',
|
||||
|
||||
@@ -35,6 +35,7 @@ import {
|
||||
} from '../../constants';
|
||||
import {
|
||||
legendSection,
|
||||
minorTicks,
|
||||
richTooltipSection,
|
||||
seriesOrderSection,
|
||||
showValueSection,
|
||||
@@ -169,6 +170,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
},
|
||||
],
|
||||
[minorTicks],
|
||||
...legendSection,
|
||||
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
|
||||
[
|
||||
|
||||
@@ -34,6 +34,7 @@ import {
|
||||
} from '../../constants';
|
||||
import {
|
||||
legendSection,
|
||||
minorTicks,
|
||||
richTooltipSection,
|
||||
seriesOrderSection,
|
||||
showValueSection,
|
||||
@@ -111,6 +112,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
},
|
||||
],
|
||||
[minorTicks],
|
||||
...legendSection,
|
||||
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import {
|
||||
} from '../../constants';
|
||||
import {
|
||||
legendSection,
|
||||
minorTicks,
|
||||
richTooltipSection,
|
||||
seriesOrderSection,
|
||||
showValueSectionWithoutStack,
|
||||
@@ -111,6 +112,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
},
|
||||
],
|
||||
[minorTicks],
|
||||
...legendSection,
|
||||
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
|
||||
[
|
||||
|
||||
@@ -32,6 +32,7 @@ import { EchartsTimeseriesSeriesType } from '../../types';
|
||||
import { DEFAULT_FORM_DATA, TIME_SERIES_DESCRIPTION_TEXT } from '../constants';
|
||||
import {
|
||||
legendSection,
|
||||
minorTicks,
|
||||
richTooltipSection,
|
||||
seriesOrderSection,
|
||||
showValueSection,
|
||||
@@ -163,6 +164,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
},
|
||||
],
|
||||
[minorTicks],
|
||||
...legendSection,
|
||||
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
|
||||
[
|
||||
|
||||
@@ -146,6 +146,7 @@ export default function transformProps(
|
||||
markerSize,
|
||||
metrics,
|
||||
minorSplitLine,
|
||||
minorTicks,
|
||||
onlyTotal,
|
||||
opacity,
|
||||
orientation,
|
||||
@@ -456,6 +457,7 @@ export default function transformProps(
|
||||
formatter: xAxisFormatter,
|
||||
rotate: xAxisLabelRotation,
|
||||
},
|
||||
minorTick: { show: minorTicks },
|
||||
minInterval:
|
||||
xAxisType === AxisType.time && timeGrainSqla
|
||||
? TIMEGRAIN_TO_TIMESTAMP[timeGrainSqla]
|
||||
@@ -474,7 +476,7 @@ export default function transformProps(
|
||||
type: logAxis ? AxisType.log : AxisType.value,
|
||||
min: yAxisMin,
|
||||
max: yAxisMax,
|
||||
minorTick: { show: true },
|
||||
minorTick: { show: minorTicks },
|
||||
minorSplitLine: { show: minorSplitLine },
|
||||
axisLabel: {
|
||||
formatter: getYAxisFormatter(
|
||||
|
||||
@@ -68,6 +68,7 @@ export type EchartsTimeseriesFormData = QueryFormData & {
|
||||
markerSize: number;
|
||||
metrics: QueryFormMetric[];
|
||||
minorSplitLine: boolean;
|
||||
minorTicks: boolean;
|
||||
opacity: number;
|
||||
orderDesc: boolean;
|
||||
rowLimit: number;
|
||||
|
||||
@@ -298,3 +298,14 @@ export const xAxisBounds: ControlSetItem = {
|
||||
Boolean(controls?.truncateXAxis?.value),
|
||||
},
|
||||
};
|
||||
|
||||
export const minorTicks: ControlSetItem = {
|
||||
name: 'minorTicks',
|
||||
config: {
|
||||
type: 'CheckboxControl',
|
||||
label: t('Minor ticks'),
|
||||
default: false,
|
||||
renderTrigger: true,
|
||||
description: t('Show minor ticks on axes.'),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user