All Projects → SnailSword → spie

SnailSword / spie

Licence: other
轻量级、无依赖的圆头效果环形图控件

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to spie

kibana diagram
Experimental Flow Diagram Vis for Kibana 6.x
Stars: ✭ 15 (-58.33%)
Mutual labels:  diagram
rover
Interactive Terraform visualization. State and configuration explorer.
Stars: ✭ 2,039 (+5563.89%)
Mutual labels:  diagram
ef-db-diagrams
Visualize model created with EntityFramework Core
Stars: ✭ 52 (+44.44%)
Mutual labels:  diagram
scdDiagram
smart substation connection and configuration software based on IEC 61850 protocal and SCD file. Email: [email protected]
Stars: ✭ 17 (-52.78%)
Mutual labels:  diagram
javascript
Basic Primitives Diagrams for JavaScript - data visualization components library that implements organizational chart and multi-parent dependency diagrams, contains implementations of JavaScript Controls and PDF rendering plugins.
Stars: ✭ 46 (+27.78%)
Mutual labels:  diagram
GoJS-projects
Project examples for GoJS
Stars: ✭ 45 (+25%)
Mutual labels:  diagram
bpmn-layout-generators
Tools for generating missing BPMNDiagram elements in BPMN files
Stars: ✭ 27 (-25%)
Mutual labels:  diagram
typedoc-plugin-mermaid
A plugin for TypeDoc that generates graphs for mermaid.js diagrams by @mermaid annotation.
Stars: ✭ 18 (-50%)
Mutual labels:  diagram
wapiml
An OpenAPI round-trip tool that leverages model-driven techniques to create, visualize, manage, and generate OpenAPI definitions.
Stars: ✭ 61 (+69.44%)
Mutual labels:  diagram
OrgChart
Organization chart layout library
Stars: ✭ 16 (-55.56%)
Mutual labels:  diagram
syntrax
Railroad syntax diagram generator
Stars: ✭ 57 (+58.33%)
Mutual labels:  diagram
cupid
A library that focuses on finding and analyzing the relationships between AsyncAPI documents. It outputs a map of the system architecture. Except for a default map, it is possible to get output as mermaid.js flow diagram, PlantUML class diagram and more to come.
Stars: ✭ 32 (-11.11%)
Mutual labels:  diagram
erdiagram
Entity-Relationship diagram code generator library
Stars: ✭ 28 (-22.22%)
Mutual labels:  diagram
AMVennDiagramView
AMVennDiagramView is a view can display the diagram like Venn diagram.
Stars: ✭ 39 (+8.33%)
Mutual labels:  diagram
cloudgram
Generate diagrams for your cloud architecture using code
Stars: ✭ 68 (+88.89%)
Mutual labels:  diagram
Mxgraph-EasyFlowEditor
基于mxGraph+vue设计的流程图编辑器
Stars: ✭ 73 (+102.78%)
Mutual labels:  diagram
visioStencils
My 2,700 visio 🎨 shapes, stencils, symbols, and icons collection to visually represent IT infrastructure
Stars: ✭ 43 (+19.44%)
Mutual labels:  diagram
sphinx-wavedrom
A sphinx extension that allows including wavedrom diagrams by using its text-based representation
Stars: ✭ 26 (-27.78%)
Mutual labels:  diagram
react-direct-graph
📏 React component for drawing direct graphs with rectangular (non-curve) edges.
Stars: ✭ 25 (-30.56%)
Mutual labels:  diagram
SMDiagramView
Diagram View for iOS
Stars: ✭ 44 (+22.22%)
Mutual labels:  diagram

npmv size

SPie

轻量级、无依赖的圆头效果环形图控件。 DEMO

安装 Installation

npm

$ npm install spie

手动安装 Manual

直接下载 dist/spie.js 并在 HTML 文件中引入:

<script src="path/to/spie/dist/spie.js"></script>

CDN

<script src="https://cdn.jsdelivr.net/npm/spie@latest/dist/spie.js"></script>

使用 Usage

新建一个元素,设置好宽高(绘制的环形图将充满该元素)。

<div id="spie-1" style="height: 100px;width: 100px">
let s1 = s.init(document.getElementById('spie-1'));
s1.setOption().setData(0.2);

let s1 = s.init(document.getElementById('spie-1'));
s1.setOption();
s1.setData(0.2);

自定义参数 Custom Options

s.setOption({
    color: '#5fb333'
}).setData(0.2);
  • color (default: '#108cee')

    有数据部分的颜色

  • bgc (default: '#fff')

    圆环底色

  • radius (default: [0.6, 0.8])

    内外半径 大的为外半径小的为内半径 顺序无所谓 支持0-1的数字或百分数

  • sw (default: 0.2)

    线宽stroke-width 只有在radius.length为1或者内外半径为同一值的的时候才有效。

  • precision (default: 4)

    精度 小于0.1^precision*5视为0, 大于等于1-0.1^precision*5视为1, 这个配置是为了在需要显示具体数字时防止出现四舍五入到0或1之后圆环没有对应变空变满。设置为false0, 会按正常的百分比计算。

  • startingPoint (default: 0)

    起始角度 最高点为0,顺时针算0-360度,支持传弧度制或角度制。数字会按角度制处理,'30rad'为弧度制。

  • clockwise (default: true)

    是否顺时针旋转

  • animation.show (default: true)

    是否开启动画

  • animation.duration (default: 0.75)

    动画持续时间

  • animation.easing (default: 'ease-in-out')

    缓动效果 可选值: lineareaseease-inease-outease-in-outcubic-bezier(n,n,n,n)

设置数据时延 Delay

s.setOption().setData(0.2, 1); // delay 1s
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].