11import { IgcNumberAbbreviatorModule , IgcDataChartCoreModule , IgcDataChartScatterModule , IgcDataChartScatterCoreModule , IgcDataChartInteractivityModule , IgcDataChartAnnotationModule } from 'igniteui-webcomponents-charts' ;
2- import { ComponentRenderer , NumberAbbreviatorDescriptionModule , DataChartCoreDescriptionModule , DataChartScatterDescriptionModule , DataChartScatterCoreDescriptionModule , DataChartInteractivityDescriptionModule , DataChartAnnotationDescriptionModule } from 'igniteui-webcomponents-core' ;
2+ import { IgcPropertyEditorPanelModule } from 'igniteui-webcomponents-layouts' ;
3+ import { ComponentRenderer , NumberAbbreviatorDescriptionModule , DataChartCoreDescriptionModule , DataChartScatterDescriptionModule , DataChartScatterCoreDescriptionModule , DataChartInteractivityDescriptionModule , DataChartAnnotationDescriptionModule , PropertyEditorPanelDescriptionModule } from 'igniteui-webcomponents-core' ;
4+ import { IgcPropertyEditorPanelComponent , IgcPropertyEditorPropertyDescriptionComponent } from 'igniteui-webcomponents-layouts' ;
35import { IgcDataChartComponent , IgcNumericXAxisComponent , IgcNumericYAxisComponent , IgcBubbleSeriesComponent , IgcSizeScaleComponent , IgcValueBrushScaleComponent } from 'igniteui-webcomponents-charts' ;
46import { WorldDebtAndPopulationItem , WorldDebtAndPopulation } from './WorldDebtAndPopulation' ;
7+ import { IgcPropertyEditorPropertyDescriptionChangedEventArgs } from 'igniteui-webcomponents-layouts' ;
8+ import { EnumUtil } from 'igniteui-webcomponents-core' ;
59
10+ import 'igniteui-webcomponents/themes/light/bootstrap.css' ;
11+ import { defineAllComponents } from 'igniteui-webcomponents' ;
612import { ModuleManager } from 'igniteui-webcomponents-core' ;
13+ defineAllComponents ( ) ;
714
815import "./index.css" ;
916
@@ -13,11 +20,15 @@ ModuleManager.register(
1320 IgcDataChartScatterModule ,
1421 IgcDataChartScatterCoreModule ,
1522 IgcDataChartInteractivityModule ,
16- IgcDataChartAnnotationModule
23+ IgcDataChartAnnotationModule ,
24+ IgcPropertyEditorPanelModule
1725) ;
1826
1927export class Sample {
2028
29+ private propertyEditor : IgcPropertyEditorPanelComponent
30+ private fillScaleMinimumValueEditor : IgcPropertyEditorPropertyDescriptionComponent
31+ private fillScaleMaximumValueEditor : IgcPropertyEditorPropertyDescriptionComponent
2132 private chart : IgcDataChartComponent
2233 private xAxis : IgcNumericXAxisComponent
2334 private yAxis : IgcNumericYAxisComponent
@@ -52,12 +63,21 @@ export class Sample {
5263 private _bind : ( ) => void ;
5364
5465 constructor ( ) {
66+ var propertyEditor = this . propertyEditor = document . getElementById ( 'PropertyEditor' ) as IgcPropertyEditorPanelComponent ;
67+ var fillScaleMinimumValueEditor = this . fillScaleMinimumValueEditor = document . getElementById ( 'FillScaleMinimumValueEditor' ) as IgcPropertyEditorPropertyDescriptionComponent ;
68+ this . scatterBubbleSeriesFillScaleSliderChanged = this . scatterBubbleSeriesFillScaleSliderChanged . bind ( this ) ;
69+ var fillScaleMaximumValueEditor = this . fillScaleMaximumValueEditor = document . getElementById ( 'FillScaleMaximumValueEditor' ) as IgcPropertyEditorPropertyDescriptionComponent ;
70+ this . scatterBubbleSeriesFillScaleSliderChanged = this . scatterBubbleSeriesFillScaleSliderChanged . bind ( this ) ;
5571 var chart = this . chart = document . getElementById ( 'chart' ) as IgcDataChartComponent ;
5672 var xAxis = this . xAxis = document . getElementById ( 'xAxis' ) as IgcNumericXAxisComponent ;
5773 var yAxis = this . yAxis = document . getElementById ( 'yAxis' ) as IgcNumericYAxisComponent ;
5874 var bubbleSeries1 = this . bubbleSeries1 = document . getElementById ( 'BubbleSeries1' ) as IgcBubbleSeriesComponent ;
5975
6076 this . _bind = ( ) => {
77+ propertyEditor . componentRenderer = this . renderer ;
78+ propertyEditor . target = this . chart ;
79+ fillScaleMinimumValueEditor . changed = this . scatterBubbleSeriesFillScaleSliderChanged ;
80+ fillScaleMaximumValueEditor . changed = this . scatterBubbleSeriesFillScaleSliderChanged ;
6181 bubbleSeries1 . radiusScale = this . sizeScale1 ;
6282 bubbleSeries1 . xAxis = this . xAxis ;
6383 bubbleSeries1 . yAxis = this . yAxis ;
@@ -88,10 +108,24 @@ export class Sample {
88108 DataChartScatterCoreDescriptionModule . register ( context ) ;
89109 DataChartInteractivityDescriptionModule . register ( context ) ;
90110 DataChartAnnotationDescriptionModule . register ( context ) ;
111+ PropertyEditorPanelDescriptionModule . register ( context ) ;
91112 }
92113 return this . _componentRenderer ;
93114 }
94115
116+ public scatterBubbleSeriesFillScaleSliderChanged ( sender : any , args : IgcPropertyEditorPropertyDescriptionChangedEventArgs ) : void {
117+ let series : IgcBubbleSeriesComponent = this . chart . actualSeries [ 0 ] as IgcBubbleSeriesComponent ;
118+
119+ let fillScale = ( series . fillScale as any ) ;
120+
121+ if ( args . newValue >= 25000 ) {
122+ fillScale . maximumValue = args . newValue ;
123+ }
124+ else {
125+ fillScale . minimumValue = args . newValue ;
126+ }
127+ }
128+
95129}
96130
97131new Sample ( ) ;
0 commit comments