File tree Expand file tree Collapse file tree 7 files changed +44
-32
lines changed
FormatDateLabelAsDateAndTime
FormatDateLabelAsShortDate
TestsUpdateGroupsInSeriesAddedEvent
TestsUpdateTitlesInSeriesAddedEvent Expand file tree Collapse file tree 7 files changed +44
-32
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export class FormatDateLabelAsDate
66{
77 //begin eventHandler
88 //WPF: Infragistics.Controls.Charts.AxisFormatLabelEventHandler
9- public formatDateLabelAsDate ( sender : any , item : any ) : string
9+ public formatDateLabelAsDate ( item : any ) : string
1010 {
1111
1212 let d : Date ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ using System.Collections;
66export class FormatDateLabelAsDateAndTime
77{
88 //begin eventHandler
9- public formatDateLabelAsDateAndTime ( sender : any , item :any ) :string
9+ public formatDateLabelAsDateAndTime ( item :any ) :string
1010 {
1111
1212 let d : Date ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export class FormatDateLabelAsShortDate
55{
66 //begin eventHandler
77 //WPF: Infragistics.Controls.Charts.AxisFormatLabelEventHandler
8- public FormatDateLabelAsShortDate ( sender : any , item : any ) : string
8+ public FormatDateLabelAsShortDate ( item : any ) : string
99 {
1010
1111 let d : Date ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export class FormatDateLabelAsTime
66{
77 //begin eventHandler
88 //WPF: Infragistics.Controls.Charts.AxisFormatLabelEventHandler
9- public formatDateLabelAsTime ( sender : any , item : any ) : string
9+ public formatDateLabelAsTime ( item : any ) : string
1010 {
1111
1212 let d : Date ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export class FormatLabelAsTest
55{
66 //begin eventHandler
77 //WPF: Infragistics.Controls.Charts.AxisFormatLabelEventHandler
8- public formatLabelAsTest ( sender : any , item : any ) : string
8+ public formatLabelAsTest ( item : any ) : string
99 {
1010 return "TEST" ;
1111 }
Original file line number Diff line number Diff line change @@ -7,18 +7,26 @@ export class TestsUpdateGrpupsInSeriesAddedEvent
77{
88 //begin eventHandler
99 groupIndex : number = 0 ;
10- public testsUpdateGroupsInSeriesAddedEvent ( sender : any , args : IgcChartSeriesEventArgs ) : void
11- {
10+ updateAnnotations : boolean = false ;
11+ groups : string [ ] = null ;
12+ public testsUpdateGroupsInSeriesAddedEvent ( sender : any , args : IgrChartSeriesEventArgs ) : void
13+ {
14+ if ( this . groups == null ) {
1215 const o = CodeGenHelper . findByName < object > ( "SeriesAddedGroups" ) ;
13- const obj = JSON . parse ( o . toString ( ) ) ;
14- const updateAnnotations : boolean = obj . includeAnnotations ;
15- const groups : string [ ] = obj . names ;
16-
17- if ( this . groupIndex >= groups . length )
18- this . groupIndex = 0 ;
19- if ( groups . includes ( args . series . dataLegendGroup ) )
20- return ; // already set
21- args . series . dataLegendGroup = groups [ this . groupIndex ++ ] ;
16+ const obj = JSON . parse ( o [ "value" ] ) ;
17+ this . updateAnnotations = obj . includeAnnotations ;
18+ this . groups = obj . names ;
19+ }
20+
21+ if ( args . series . isAnnotationLayer && ! this . updateAnnotations ) {
22+ return ;
23+ }
24+
25+ if ( this . groupIndex >= this . groups . length )
26+ this . groupIndex = 0 ;
27+ if ( this . groups . includes ( args . series . dataLegendGroup ) )
28+ return ; // already set
29+ args . series . dataLegendGroup = this . groups [ this . groupIndex ++ ] ;
2230 }
2331 //end eventHandler
2432}
Original file line number Diff line number Diff line change @@ -6,27 +6,31 @@ import { IgcChartSeriesEventArgs } from 'igniteui-webcomponents-charts';
66export class TestsUpdateTitlesInSeriesAddedEvent {
77 //begin eventHandler
88 titleIndex :number = 0 ;
9- public testsUpdateTitlesInSeriesAddedEvent ( sender : any , args : IgcChartSeriesEventArgs ) : void {
10- const o = CodeGenHelper . findByName < any > ( "SeriesAddedTitles" ) ;
11- const obj = JSON . parse ( o . toString ( ) ) ;
12-
13- const updateAnnotations : boolean = obj . includeAnnotations ;
14- const names : string [ ] = obj . names ;
15-
16- if ( args . series . isAnnotationLayer && ! updateAnnotations ) {
9+ updateAnnotations : boolean = false ;
10+ names : string [ ] = null ;
11+ public testsUpdateTitlesInSeriesAddedEvent ( sender : any , args : IgrChartSeriesEventArgs ) : void {
12+ if ( this . names == null ) {
13+ const o = CodeGenHelper . findByName < any > ( "SeriesAddedTitles" ) ;
14+ const obj = JSON . parse ( o [ "value" ] ) ;
15+
16+ this . updateAnnotations = obj . includeAnnotations ;
17+ this . names = obj . names ;
18+ }
19+
20+ if ( args . series . isAnnotationLayer && ! this . updateAnnotations ) {
1721 return ;
1822 }
19-
20- if ( this . titleIndex >= names . length ) {
23+
24+ if ( this . titleIndex >= this . names . length ) {
2125 this . titleIndex = 0 ;
2226 }
23-
24- if ( names . includes ( args . series . title ) ) {
27+
28+ if ( this . names . includes ( args . series . title ) ) {
2529 return ; // already set
2630 }
27-
28- args . series . title = names [ this . titleIndex ++ ] ;
29-
30- }
31+
32+ args . series . title = this . names [ this . titleIndex ++ ] ;
33+
34+ }
3135 //end eventHandler
3236}
You can’t perform that action at this time.
0 commit comments