@@ -862,6 +862,36 @@ QUnit.test('Using the single section of axis options for some panes (check custo
862862 assert . deepEqual ( visualRangeChanged . getCall ( 2 ) . args [ 0 ] . value , { startValue : 18 , endValue : 25 } ) ;
863863} ) ;
864864
865+ // T1317590
866+ QUnit . test ( 'Argument axis overlays/labels are removed when dataSource update' , function ( assert ) {
867+ const initialData = [
868+ { arg : 'Monday' , val : 1 } ,
869+ { arg : 'Friday' , val : 2 }
870+ ] ;
871+ const updatedData = [
872+ { arg : 'Tuesday' , val : 3 } ,
873+ { arg : 'Thursday' , val : 4 }
874+ ] ;
875+
876+ const chart = this . createChart ( {
877+ dataSource : initialData ,
878+ series : { argumentField : 'arg' , valueField : 'val' } ,
879+ argumentAxis : { label : { visible : true } }
880+ } ) ;
881+
882+ let label = this . $container . find ( '.dxc-arg-elements text' ) . filter ( function ( ) {
883+ return $ ( this ) . text ( ) === 'Friday' ;
884+ } ) ;
885+ assert . ok ( label . length , 'Friday label exists' ) ;
886+
887+ chart . option ( 'dataSource' , updatedData ) ;
888+
889+ label = this . $container . find ( '.dxc-arg-elements text' ) . filter ( function ( ) {
890+ return $ ( this ) . text ( ) === 'Friday' ;
891+ } ) ;
892+ assert . notOk ( label . length , 'Friday label is not exists' ) ;
893+ } ) ;
894+
865895// T681674
866896QUnit . test ( 'actual value axis visualRange after dataSource updating (argument axis without visual range)' , function ( assert ) {
867897 const chart = this . createChart ( {
0 commit comments