Skip to content

Commit a5cb133

Browse files
committed
docs(Polygon): Remove duplicate ocotogon example and add rectangle
1 parent b3e203c commit a5cb133

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

  • packages/layerchart/src/routes/docs/components/Polygon

packages/layerchart/src/routes/docs/components/Polygon/+page.svelte

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
</div>
113113

114114
<div>
115-
<h3>Diamond</h3>
115+
<h3>Rectangle</h3>
116116
<Preview>
117117
<div class="h-[150px] p-4 border rounded-sm">
118118
<Chart>
@@ -123,8 +123,8 @@
123123
cy={context.height / 2}
124124
r={60}
125125
points={4}
126-
scaleX={0.5}
127-
{rotate}
126+
scaleX={1.5}
127+
rotate={rotate + 45}
128128
{cornerRadius}
129129
/>
130130
</Layer>
@@ -135,7 +135,7 @@
135135
</div>
136136

137137
<div>
138-
<h3>Rhombus</h3>
138+
<h3>Diamond</h3>
139139
<Preview>
140140
<div class="h-[150px] p-4 border rounded-sm">
141141
<Chart>
@@ -146,8 +146,8 @@
146146
cy={context.height / 2}
147147
r={60}
148148
points={4}
149-
skewX={-20}
150-
rotate={rotate + 45}
149+
scaleX={0.5}
150+
{rotate}
151151
{cornerRadius}
152152
/>
153153
</Layer>
@@ -158,7 +158,7 @@
158158
</div>
159159

160160
<div>
161-
<h3>Parallelogram</h3>
161+
<h3>Rhombus</h3>
162162
<Preview>
163163
<div class="h-[150px] p-4 border rounded-sm">
164164
<Chart>
@@ -170,7 +170,6 @@
170170
r={60}
171171
points={4}
172172
skewX={-20}
173-
scaleX={1.5}
174173
rotate={rotate + 45}
175174
{cornerRadius}
176175
/>
@@ -182,7 +181,7 @@
182181
</div>
183182

184183
<div>
185-
<h3>Trapezoid</h3>
184+
<h3>Parallelogram</h3>
186185
<Preview>
187186
<div class="h-[150px] p-4 border rounded-sm">
188187
<Chart>
@@ -193,7 +192,8 @@
193192
cy={context.height / 2}
194193
r={60}
195194
points={4}
196-
tiltX={-1}
195+
skewX={-20}
196+
scaleX={1.5}
197197
rotate={rotate + 45}
198198
{cornerRadius}
199199
/>
@@ -205,7 +205,7 @@
205205
</div>
206206

207207
<div>
208-
<h3>Pentagon</h3>
208+
<h3>Trapezoid</h3>
209209
<Preview>
210210
<div class="h-[150px] p-4 border rounded-sm">
211211
<Chart>
@@ -215,8 +215,9 @@
215215
cx={context.width / 2}
216216
cy={context.height / 2}
217217
r={60}
218-
points={5}
219-
{rotate}
218+
points={4}
219+
tiltX={-1}
220+
rotate={rotate + 45}
220221
{cornerRadius}
221222
/>
222223
</Layer>
@@ -227,7 +228,7 @@
227228
</div>
228229

229230
<div>
230-
<h3>Hexagon</h3>
231+
<h3>Pentagon</h3>
231232
<Preview>
232233
<div class="h-[150px] p-4 border rounded-sm">
233234
<Chart>
@@ -237,7 +238,7 @@
237238
cx={context.width / 2}
238239
cy={context.height / 2}
239240
r={60}
240-
points={6}
241+
points={5}
241242
{rotate}
242243
{cornerRadius}
243244
/>
@@ -249,7 +250,7 @@
249250
</div>
250251

251252
<div>
252-
<h3>Octagon</h3>
253+
<h3>Hexagon</h3>
253254
<Preview>
254255
<div class="h-[150px] p-4 border rounded-sm">
255256
<Chart>
@@ -259,7 +260,7 @@
259260
cx={context.width / 2}
260261
cy={context.height / 2}
261262
r={60}
262-
points={8}
263+
points={6}
263264
{rotate}
264265
{cornerRadius}
265266
/>

0 commit comments

Comments
 (0)