mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(chart control): Change default of "Y Axis Title Margin" (#32720)
This commit is contained in:
committed by
GitHub
parent
5392bafe28
commit
d319543377
@@ -510,29 +510,29 @@ describe('Drill by modal', () => {
|
||||
|
||||
it('Line chart', () => {
|
||||
testEchart('echarts_timeseries_line', 'Line Chart', [
|
||||
[70, 93],
|
||||
[70, 93],
|
||||
[85, 93],
|
||||
[85, 93],
|
||||
]);
|
||||
});
|
||||
|
||||
it('Area Chart', () => {
|
||||
testEchart('echarts_area', 'Area Chart', [
|
||||
[70, 93],
|
||||
[70, 93],
|
||||
[85, 93],
|
||||
[85, 93],
|
||||
]);
|
||||
});
|
||||
|
||||
it('Scatter Chart', () => {
|
||||
testEchart('echarts_timeseries_scatter', 'Scatter Chart', [
|
||||
[70, 93],
|
||||
[70, 93],
|
||||
[85, 93],
|
||||
[85, 93],
|
||||
]);
|
||||
});
|
||||
|
||||
it('Bar Chart', () => {
|
||||
testEchart('echarts_timeseries_bar', 'Bar Chart', [
|
||||
[70, 94],
|
||||
[362, 68],
|
||||
[85, 94],
|
||||
[490, 68],
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -565,22 +565,22 @@ describe('Drill by modal', () => {
|
||||
|
||||
it('Generic Chart', () => {
|
||||
testEchart('echarts_timeseries', 'Generic Chart', [
|
||||
[70, 93],
|
||||
[70, 93],
|
||||
[85, 93],
|
||||
[85, 93],
|
||||
]);
|
||||
});
|
||||
|
||||
it('Smooth Line Chart', () => {
|
||||
testEchart('echarts_timeseries_smooth', 'Smooth Line Chart', [
|
||||
[70, 93],
|
||||
[70, 93],
|
||||
[85, 93],
|
||||
[85, 93],
|
||||
]);
|
||||
});
|
||||
|
||||
it('Step Line Chart', () => {
|
||||
testEchart('echarts_timeseries_step', 'Step Line Chart', [
|
||||
[70, 93],
|
||||
[70, 93],
|
||||
[85, 93],
|
||||
[85, 93],
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -616,8 +616,8 @@ describe('Drill by modal', () => {
|
||||
cy.get('[data-test-viz-type="mixed_timeseries"] canvas').then($canvas => {
|
||||
// click 'boy'
|
||||
cy.wrap($canvas).scrollIntoView();
|
||||
cy.wrap($canvas).trigger('mouseover', 70, 93);
|
||||
cy.wrap($canvas).rightclick(70, 93);
|
||||
cy.wrap($canvas).trigger('mouseover', 85, 93);
|
||||
cy.wrap($canvas).rightclick(85, 93);
|
||||
|
||||
drillBy('name').then(intercepted => {
|
||||
const { queries } = intercepted.request.body;
|
||||
@@ -650,8 +650,8 @@ describe('Drill by modal', () => {
|
||||
cy.get(`[data-test="drill-by-chart"] canvas`).then($canvas => {
|
||||
// click second query
|
||||
cy.wrap($canvas).scrollIntoView();
|
||||
cy.wrap($canvas).trigger('mouseover', 246, 114);
|
||||
cy.wrap($canvas).rightclick(246, 114);
|
||||
cy.wrap($canvas).trigger('mouseover', 261, 114);
|
||||
cy.wrap($canvas).rightclick(261, 114);
|
||||
|
||||
drillBy('ds').then(intercepted => {
|
||||
const { queries } = intercepted.request.body;
|
||||
|
||||
@@ -95,24 +95,24 @@ function testTimeChart(vizType: string) {
|
||||
|
||||
cy.get(`[data-test-viz-type='${vizType}'] canvas`).then($canvas => {
|
||||
cy.wrap($canvas).scrollIntoView();
|
||||
cy.wrap($canvas).trigger('mousemove', 70, 93);
|
||||
cy.wrap($canvas).rightclick(70, 93);
|
||||
cy.wrap($canvas).trigger('mousemove', 85, 93);
|
||||
cy.wrap($canvas).rightclick(85, 93);
|
||||
|
||||
drillToDetailBy('Drill to detail by 1965');
|
||||
cy.getBySel('filter-val').should('contain', '1965');
|
||||
closeModal();
|
||||
|
||||
cy.wrap($canvas).scrollIntoView();
|
||||
cy.wrap($canvas).trigger('mousemove', 70, 93);
|
||||
cy.wrap($canvas).rightclick(70, 93);
|
||||
cy.wrap($canvas).trigger('mousemove', 85, 93);
|
||||
cy.wrap($canvas).rightclick(85, 93);
|
||||
|
||||
drillToDetailBy('Drill to detail by boy');
|
||||
cy.getBySel('filter-val').should('contain', 'boy');
|
||||
closeModal();
|
||||
|
||||
cy.wrap($canvas).scrollIntoView();
|
||||
cy.wrap($canvas).trigger('mousemove', 70, 93);
|
||||
cy.wrap($canvas).rightclick(70, 93);
|
||||
cy.wrap($canvas).trigger('mousemove', 85, 93);
|
||||
cy.wrap($canvas).rightclick(85, 93);
|
||||
|
||||
drillToDetailBy('Drill to detail by all');
|
||||
cy.getBySel('filter-val').first().should('contain', '1965');
|
||||
@@ -434,7 +434,7 @@ describe('Drill to detail modal', () => {
|
||||
SUPPORTED_TIER2_CHARTS.forEach(waitForChartLoad);
|
||||
});
|
||||
|
||||
describe('Modal actions', () => {
|
||||
describe.only('Modal actions', () => {
|
||||
it('clears filters', () => {
|
||||
interceptSamples();
|
||||
|
||||
@@ -442,7 +442,7 @@ describe('Drill to detail modal', () => {
|
||||
cy.get("[data-test-viz-type='box_plot'] canvas").then($canvas => {
|
||||
const canvasWidth = $canvas.width() || 0;
|
||||
const canvasHeight = $canvas.height() || 0;
|
||||
const canvasCenterX = canvasWidth / 3;
|
||||
const canvasCenterX = canvasWidth / 3 + 15;
|
||||
const canvasCenterY = (canvasHeight * 5) / 6;
|
||||
|
||||
cy.wrap($canvas).scrollIntoView();
|
||||
|
||||
@@ -84,7 +84,7 @@ export const titleControls: ControlPanelSectionConfig = {
|
||||
clearable: true,
|
||||
label: t('Y Axis Title Margin'),
|
||||
renderTrigger: true,
|
||||
default: TITLE_MARGIN_OPTIONS[0],
|
||||
default: TITLE_MARGIN_OPTIONS[1],
|
||||
choices: formatSelectOptions(TITLE_MARGIN_OPTIONS),
|
||||
description: t('Changing this control takes effect instantly'),
|
||||
},
|
||||
|
||||
@@ -122,7 +122,7 @@ function createAxisTitleControl(axis: 'x' | 'y'): ControlSetRow[] {
|
||||
clearable: true,
|
||||
label: t('AXIS TITLE MARGIN'),
|
||||
renderTrigger: true,
|
||||
default: sections.TITLE_MARGIN_OPTIONS[0],
|
||||
default: sections.TITLE_MARGIN_OPTIONS[1],
|
||||
choices: formatSelectOptions(sections.TITLE_MARGIN_OPTIONS),
|
||||
description: t('Changing this control takes effect instantly'),
|
||||
visibility: ({ controls }: ControlPanelsContainerProps) =>
|
||||
|
||||
Reference in New Issue
Block a user