Skip to content

Commit

Permalink
enable chart selection based on legends in declarative charts
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush2303 committed Dec 12, 2024
1 parent 53dd771 commit d07e154
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartSt
super(props);
this._createSet = memoizeFunction(this._createDataSet);
this.state = {
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
activeLegend: '',
hoverXValue: '',
isCalloutVisible: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class DonutChartBase extends React.Component<IDonutChartProps, IDonutChar
color: '',
xCalloutValue: '',
yCalloutValue: '',
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
focusedArcId: '',
};
this._hoverCallback = this._hoverCallback.bind(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class GaugeChartBase extends React.Component<IGaugeChartProps, IGaugeChar

this.state = {
hoveredLegend: '',
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
focusedElement: '',
calloutTarget: null,
isCalloutVisible: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class GroupedVerticalBarChartBase extends React.Component<
dataForHoverCard: 0,
isCalloutVisible: false,
refSelected: null,
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
xCalloutValue: '',
yCalloutValue: '',
YValueHover: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class HeatMapChartBase extends React.Component<IHeatMapChartProps, IHeatM
): DataSet => this._createNewDataSet(data, xDate, xNum, yDate, yNum),
);
this.state = {
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
activeLegend: '',
isCalloutVisible: false,
target: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ export class HorizontalBarChartWithAxisBase extends React.Component<
color: '',
dataForHoverCard: 0,
isCalloutVisible: false,
isLegendSelected: false,
isLegendSelected: true,
isLegendHovered: false,
refSelected: null,
selectedLegendTitle: '',
selectedLegendTitle: props.legendProps?.selectedLegend ?? '',
xCalloutValue: '',
yCalloutValue: '',
activeXdataPoint: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class LineChartBase extends React.Component<ILineChartProps, ILineChartSt
activeLegend: '',
YValueHover: [],
refSelected: '',
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
isCalloutVisible: false,
selectedLegendPoints: [],
selectedColorBarLegend: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class MultiStackedBarChartBase extends React.Component<IMultiStackedBarCh
this.state = {
isCalloutVisible: false,
refArray: [],
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
activeLegend: '',
refSelected: null,
dataForHoverCard: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class StackedBarChartBase extends React.Component<IStackedBarChartProps,
super(props);
this.state = {
isCalloutVisible: false,
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
activeLegend: '',
refSelected: null,
dataForHoverCard: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class VerticalBarChartBase extends React.Component<IVerticalBarChartProps
dataForHoverCard: 0,
isCalloutVisible: false,
refSelected: null,
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
activeLegend: '',
xCalloutValue: '',
yCalloutValue: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class VerticalStackedBarChartBase extends React.Component<
super(props);
this.state = {
isCalloutVisible: false,
selectedLegend: '',
selectedLegend: props.legendProps?.selectedLegend ?? '',
activeLegend: '',
refSelected: null,
dataForHoverCard: 0,
Expand Down

0 comments on commit d07e154

Please sign in to comment.