layercake

graphics framework for sveltejs

Github星跟蹤圖

Layer Cake

a framework for mostly-reusable graphics with svelte

Travis (.org) branch npm version

? See examples
? Read the guide
? API docs
? Starter template
?

Example

<script>
  import { LayerCake, Svg, Html, Canvas } from 'layercake';

  import AxisX from './components/AxisX.svelte';
  import AxisY from './components/AxisY.svelte';
  import Line from './components/Line.svelte';
  import Scatter from './components/Scatter.svelte';
  import Labels from './components/Labels.svelte';

  const data = [{ x: 0, y: 1 }, { x: 1, y: 2 }];
</script>

<style>
  .chart-container {
    width: 100%;
    height: 500px;
  }
</style>

<div class="chart-container">
  <LayerCake
    x='x'
    y='y'
    {data}
  >
    <Svg>
      <AxisX/>
      <AxisY/>
      <Line color='#f0c'/>
    </Svg>

    <Canvas>
      <Scatter color='#0fc'/>
    </Canvas>

    <Html>
      <Labels/>
    </Html>
  </LayerCake>
</div>

Install

Layer Cake lives in your devDependencies alongside Svelte, which it lists as a peerDependency.

npm install --save-dev layercake

License

MIT

主要指標

概覽
名稱與所有者mhkeller/layercake
主編程語言Svelte
編程語言JavaScript (語言數: 5)
平台
許可證MIT License
所有者活动
創建於2018-07-17 06:49:33
推送於2025-05-13 12:16:33
最后一次提交
發布數64
最新版本名稱v8.4.2 (發布於 2024-10-31 12:28:29)
第一版名稱v0.1.0 (發布於 2018-10-17 23:13:33)
用户参与
星數1.6k
關注者數10
派生數37
提交數1.1k
已啟用問題?
問題數129
打開的問題數8
拉請求數91
打開的拉請求數8
關閉的拉請求數37
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?