Skip to content

Commit

Permalink
fix(radar): Make data points stay over radar
Browse files Browse the repository at this point in the history
Generate radar prior the line element, which draws data points.

Fix #952
  • Loading branch information
netil authored Jun 27, 2019
1 parent bc16543 commit 4db457d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions spec/shape/shape.radar-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ describe("SHAPE RADAR", () => {
};
});

it("data points should positioned over radar chart element", () => {
expect(chart.internal.radars.node().nextSibling.classList.contains(CLASS.chartLines)).to.be.true;
});

it("check for shape rendering", done => {
const radar = chart.$.main.select(`.${CLASS.chartRadars}`);
const expectedPoints = "233,30.290000000000003 233,233 309.32696069614934,277.06739130434784";
Expand Down
2 changes: 1 addition & 1 deletion src/internals/ChartInternal.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export default class ChartInternal {
initChartElements() {
const $$ = this;

["Bar", "Line", "Bubble", "Arc", "Gauge", "Pie", "Radar"].forEach(v => {
["Bar", "Radar", "Line", "Bubble", "Arc", "Gauge", "Pie"].forEach(v => {
$$[`init${v}`]();
});

Expand Down

0 comments on commit 4db457d

Please sign in to comment.