Skip to content

Commit 3781ac8

Browse files
authored
Merge pull request #113 from classmodel/tickformat
Update tickformat on plots
2 parents b18a1f8 + 529cca7 commit 3781ac8

File tree

1 file changed

+2
-2
lines changed
  • apps/class-solid/src/components/plots

1 file changed

+2
-2
lines changed

apps/class-solid/src/components/plots/Axes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const AxisBottom = (props: AxisProps) => {
1919
props.type && updateChart("scalePropsX", { type: props.type });
2020
});
2121

22-
const format = () => (props.tickFormat ? props.tickFormat : d3.format(".3g"));
22+
const format = () => (props.tickFormat ? props.tickFormat : d3.format(".4"));
2323
const ticks = () => props.tickValues || generateTicks(chart.scaleX.domain());
2424
return (
2525
<g transform={`translate(0,${chart.innerHeight - 0.5})`}>
@@ -49,7 +49,7 @@ export const AxisLeft = (props: AxisProps) => {
4949
});
5050

5151
const ticks = () => props.tickValues || generateTicks(chart.scaleY.domain());
52-
const format = () => (props.tickFormat ? props.tickFormat : d3.format(".0f"));
52+
const format = () => (props.tickFormat ? props.tickFormat : d3.format(".4"));
5353
return (
5454
<g transform="translate(-0.5,0)">
5555
<line

0 commit comments

Comments
 (0)