@sveltejs/pancake
Advanced tools
| <script> | ||
| import { getChartContext } from './Chart.svelte'; | ||
| export let x1 = 0; | ||
| export let x2 = 1; | ||
| export let y1 = 0; | ||
| export let y2 = 1; | ||
| const { x_scale, y_scale } = getChartContext(); | ||
| $: left = $x_scale(x1); | ||
| $: right = $x_scale(x2); | ||
| $: top = $y_scale(y1); | ||
| $: bottom = $y_scale(y2); | ||
| </script> | ||
| <slot | ||
| x={Math.min(left, right)} | ||
| y={Math.min(top, bottom)} | ||
| width={Math.abs(right - left)} | ||
| height={Math.abs(bottom - top)} | ||
| ></slot> |
+4
-0
| # @sveltejs/pancake changelog | ||
| ## 0.0.17 | ||
| * Add `<SvgRect>` component, similar to `<Box>` | ||
| ## 0.0.16 | ||
@@ -4,0 +8,0 @@ |
| <script> | ||
| import { getChartContext } from './Chart.svelte'; | ||
| import { get_ticks } from '../utils/ticks.mjs'; | ||
@@ -5,0 +4,0 @@ export let x1 = 0; |
+1
-0
@@ -15,2 +15,3 @@ export { default as Chart } from './components/Chart.svelte'; | ||
| export { default as SvgLine } from './components/SvgLine.svelte'; | ||
| export { default as SvgRect } from './components/SvgRect.svelte'; | ||
| export { default as SvgScatterplot } from './components/SvgScatterplot.svelte'; | ||
@@ -17,0 +18,0 @@ export { default as SvgPoint } from './components/SvgPoint.svelte'; |
+1
-1
| { | ||
| "name": "@sveltejs/pancake", | ||
| "version": "0.0.16", | ||
| "version": "0.0.17", | ||
| "description": "Experimental charting library for Svelte", | ||
@@ -5,0 +5,0 @@ "module": "index.mjs", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
16486
3.22%22
4.76%205
0.49%0
-100%