Skip to content

Commit

Permalink
add round off to y axis
Browse files Browse the repository at this point in the history
  • Loading branch information
lovedeep92 committed Oct 21, 2021
1 parent 59523af commit 0a4a041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/line-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class LineGraph extends HTMLElement {
var xAxis = d3.axisBottom(xScale).ticks(5);
// Configure Y Axis ticks and
var yAxis = d3.axisLeft(yScale).ticks(5).tickFormat((d) => {
return `${d}${unit}`;
return `${Utils.roundUnitsValue(unit, d)}${unit}`;
});


Expand Down

0 comments on commit 0a4a041

Please sign in to comment.