Skip to content

Commit

Permalink
feat: add option to disable axes independently
Browse files Browse the repository at this point in the history
  • Loading branch information
ordago committed Apr 26, 2024
1 parent 3549ebe commit 96dbb04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Graph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<template v-if="axis">
<line
v-if="axisX"
:x1="offset.x"
:y1="0"
:x2="offset.x"
Expand All @@ -41,6 +42,7 @@
:stroke-width="1.5 * invScale"
/>
<line
v-if="axisY"
:x1="0"
:y1="offset.y"
:x2="width"
Expand Down Expand Up @@ -131,6 +133,8 @@ const props = withDefaults(
domainX?: PossibleVector2;
domainY?: PossibleVector2;
axis?: boolean;
axisX?: boolean;
axisY?: boolean;
grid?: boolean;
units?: boolean;
}>(),
Expand All @@ -142,6 +146,8 @@ const props = withDefaults(
domainX: () => new Vector2(-5, 5),
domainY: () => new Vector2(-5, 5),
axis: true,
axisX: true,
axisY: true,
grid: true,
units: true,
},
Expand Down

0 comments on commit 96dbb04

Please sign in to comment.