Skip to content

Commit

Permalink
set axisType when single data is present
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubhabrata08 committed Jan 8, 2024
1 parent a493617 commit 4660eb8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,14 @@ export class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartSt
let axisType: XAxisTypes | null = null;
let pointToHighlight: string | Date | number | null = null;
let index: null | number = null;
axisType = getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes;
if (d0 === undefined && d1 !== undefined) {
pointToHighlight = d1.x;
index = i;
} else if (d0 !== undefined && d1 === undefined) {
pointToHighlight = d0.x;
index = i - 1;
} else {
axisType = getTypeOfAxis(lineChartData![0].data[0].x, true) as XAxisTypes;
let x0;
let point0;
let point1;
Expand Down Expand Up @@ -866,7 +866,6 @@ export class AreaChartBase extends React.Component<IAreaChartProps, IAreaChartSt
const found: any = this._calloutPoints.find((e: { x: string | number }) => e.x === modifiedXVal);
// Show details in the callout for the focused point only
found.values = found.values.filter((e: { y: number }) => e.y === y);

this.setState({
refSelected: `#${circleId}`,
isCalloutVisible: true,
Expand Down

0 comments on commit 4660eb8

Please sign in to comment.