From eb507a39d5ae5562042246817f9a7ff519aa8739 Mon Sep 17 00:00:00 2001 From: dmlvr Date: Wed, 24 Jun 2026 19:18:35 +0300 Subject: [PATCH 1/3] fix bug and write test --- .../js/__internal/viz/axes/base_axis.ts | 2 +- .../DevExpress.viz.charts/chart.tests.js | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/packages/devextreme/js/__internal/viz/axes/base_axis.ts b/packages/devextreme/js/__internal/viz/axes/base_axis.ts index 34276f566046..66b8919a6f1d 100644 --- a/packages/devextreme/js/__internal/viz/axes/base_axis.ts +++ b/packages/devextreme/js/__internal/viz/axes/base_axis.ts @@ -997,7 +997,7 @@ Axis.prototype = { that._setTickOffset(); that._isHorizontal = options.isHorizontal; - that.pane = options.pane; + that.pane = options.pane ?? that.pane; that.name = options.name; that.priority = options.priority; diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js index 4cb701dc1d9d..67a820fa44bb 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js @@ -145,6 +145,42 @@ QUnit.test('Set adaptive layout options', function(assert) { assert.deepEqual(this.LayoutManager.firstCall.returnValue.setOptions.lastCall.args, [{ width: 80, height: 80, keepLabels: true }]); }); +QUnit.test('Constant lines dynamic update with automatically created value axis (T891599)', function(assert) { + const chart = this.createChart({ + dataSource: [ + { t: new Date(2026, 5, 16), val1: 14.13, val2: 0, val3: 12 } + ], + commonSeriesSettings: { + argumentField: 't' + }, + panes: [ + { name: 'pane1' }, + { name: 'pane2' }, + { name: 'pane3' } + ], + series: [ + { axis: 'ax_1', pane: 'pane1', type: 'line', valueField: 'val1' }, + { axis: 'ax_2', pane: 'pane2', type: 'line', valueField: 'val2' }, + { axis: 'ax_3', pane: 'pane3', type: 'line', valueField: 'val3' } + ], + valueAxis: [ + { name: 'ax_1' }, + { name: 'ax_2' } + ], + argumentAxis: { + argumentType: 'datetime', + constantLines: [{ value: new Date(2026, 5, 16) }] + } + }); + + try { + chart.option('argumentAxis.constantLines', [{ value: new Date(2026, 5, 16) }]); + assert.ok(true, 'no error during update'); + } catch(e) { + assert.ok(false, 'error: ' + e.message); + } +}); + QUnit.module('dxChart user options of dataValidator', environment); QUnit.test('dataPrepareSettings', function(assert) { From 179146e1a57eeafae1b5da4a7a1b5a4d21248f03 Mon Sep 17 00:00:00 2001 From: dmlvr Date: Wed, 24 Jun 2026 20:13:10 +0300 Subject: [PATCH 2/3] update test --- .../chart.integration.tests.js | 37 +++++++++++++++++++ .../DevExpress.viz.charts/chart.tests.js | 36 ------------------ 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js index 4029fcae8b52..83508e0a61d3 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js @@ -2015,6 +2015,43 @@ QUnit.test('Validate Axis on update', function(assert) { assert.strictEqual(chart.getArgumentAxis().getOptions().type, 'continuous'); }); +QUnit.test('Constant lines dynamic update with automatically created value axis (T891599)', function(assert) { + const chart = this.createChart({ + dataSource: [ + { t: new Date(2026, 5, 16), val1: 14.13, val2: 0, val3: 12 } + ], + commonSeriesSettings: { + argumentField: 't' + }, + panes: [ + { name: 'pane1' }, + { name: 'pane2' }, + { name: 'pane3' } + ], + series: [ + { axis: 'ax_1', pane: 'pane1', type: 'line', valueField: 'val1' }, + { axis: 'ax_2', pane: 'pane2', type: 'line', valueField: 'val2' }, + { axis: 'ax_3', pane: 'pane3', type: 'line', valueField: 'val3' } + ], + valueAxis: [ + { name: 'ax_1' }, + { name: 'ax_2' } + ], + argumentAxis: { + argumentType: 'datetime', + constantLines: [{ value: new Date(2026, 5, 16) }] + } + }); + + try { + chart.option('argumentAxis.constantLines', [{ value: new Date(2026, 5, 16) }]); + assert.ok(true, 'no error during update'); + } catch(e) { + assert.ok(false, 'error: ' + e.message); + } +}); + + // T951843 QUnit.test('Chart can hide series on done event', function(assert) { const drawn = sinon.spy(); diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js index 67a820fa44bb..4cb701dc1d9d 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.tests.js @@ -145,42 +145,6 @@ QUnit.test('Set adaptive layout options', function(assert) { assert.deepEqual(this.LayoutManager.firstCall.returnValue.setOptions.lastCall.args, [{ width: 80, height: 80, keepLabels: true }]); }); -QUnit.test('Constant lines dynamic update with automatically created value axis (T891599)', function(assert) { - const chart = this.createChart({ - dataSource: [ - { t: new Date(2026, 5, 16), val1: 14.13, val2: 0, val3: 12 } - ], - commonSeriesSettings: { - argumentField: 't' - }, - panes: [ - { name: 'pane1' }, - { name: 'pane2' }, - { name: 'pane3' } - ], - series: [ - { axis: 'ax_1', pane: 'pane1', type: 'line', valueField: 'val1' }, - { axis: 'ax_2', pane: 'pane2', type: 'line', valueField: 'val2' }, - { axis: 'ax_3', pane: 'pane3', type: 'line', valueField: 'val3' } - ], - valueAxis: [ - { name: 'ax_1' }, - { name: 'ax_2' } - ], - argumentAxis: { - argumentType: 'datetime', - constantLines: [{ value: new Date(2026, 5, 16) }] - } - }); - - try { - chart.option('argumentAxis.constantLines', [{ value: new Date(2026, 5, 16) }]); - assert.ok(true, 'no error during update'); - } catch(e) { - assert.ok(false, 'error: ' + e.message); - } -}); - QUnit.module('dxChart user options of dataValidator', environment); QUnit.test('dataPrepareSettings', function(assert) { From a48876d1712a369e305fe2dafa8c80193259634d Mon Sep 17 00:00:00 2001 From: dmlvr Date: Thu, 25 Jun 2026 19:07:48 +0300 Subject: [PATCH 3/3] remove try-cath construction from test --- .../DevExpress.viz.charts/chart.integration.tests.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js index 83508e0a61d3..953ea43bdf2c 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.charts/chart.integration.tests.js @@ -2043,12 +2043,8 @@ QUnit.test('Constant lines dynamic update with automatically created value axis } }); - try { - chart.option('argumentAxis.constantLines', [{ value: new Date(2026, 5, 16) }]); - assert.ok(true, 'no error during update'); - } catch(e) { - assert.ok(false, 'error: ' + e.message); - } + chart.option('argumentAxis.constantLines', [{ value: new Date(2026, 5, 16) }]); + assert.ok(true, 'dynamic update argumentAxis.constantLines do not throw error'); });