Skip to content

Commit

Permalink
fix: add code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rshen91 committed Apr 12, 2021
1 parent 5935818 commit 9b11e85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/chart_types/xy_chart/renderer/canvas/xy_chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ class XYChartComponent extends React.Component<XYChartProps> {
this.ctx = null;
return null;
}
const multipleSeriesTypes: string[] = [];
seriesTypes.forEach((value) => multipleSeriesTypes.push(value));

const chartSeriesTypes =
seriesTypes.size > 1 ? `Mixed chart: ${[...seriesTypes].join(' and ')} chart` : `${[...seriesTypes]} chart`;

Expand All @@ -181,7 +180,7 @@ class XYChartComponent extends React.Component<XYChartProps> {
role="presentation"
>
<dl className="echScreen-reader">
<dt> Chart type </dt>
<dt>Chart type</dt>
<dd>{chartSeriesTypes}</dd>
</dl>
</canvas>
Expand Down
2 changes: 1 addition & 1 deletion src/chart_types/xy_chart/renderer/dom/_screen_reader.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.echScreen-reader {
.echScreenReaderOnly {
position: absolute;
left: -10000px;
top: auto;
Expand Down
2 changes: 1 addition & 1 deletion src/components/__snapshots__/chart.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ exports[`Chart should render the legend name test 1`] = `
<canvas className=\\"echCanvasRenderer\\" width={150} height={200} style={{...}} role=\\"presentation\\">
<dl className=\\"echScreen-reader\\">
<dt>
Chart type
Chart type
</dt>
<dd>
bar chart
Expand Down

0 comments on commit 9b11e85

Please sign in to comment.