Giter VIP home page Giter VIP logo

svelte-zoomable-circles's Introduction

svelte-zoomable-circles

A Svelte.js component for displaying and browsing hierarchical data using zoomable circles

Built with Svelte and D3.js

demo

demo

Live demo: openopensource.com

usage

<script>
	import ZoomableCircles from "svelte-zoomable-circles";
</script>

<ZoomableCircles tree={treeObject} />

The tree object must be a JSON object in the following format:

export const sampleTree = {
  name: "Root",
  children: [
    {
      name: "Child 1",
      children: [
        {
          name: "Child 1.1",
          value: 1000
        },
        {
          name: "Child 1.2",
          value: 500
        },
        {
          name: "Child 1.3",
          value: 250
        },
      ]
    },
    {
      name: "Child2",
      value: 800
    },
    {
      name: "Child3",
      value: 600
    },
  ]
}

props

Prop Type Default Description
tree object sampleTree Component data
svgHeight number 300 Container height
svgWidth number 300 Container width
startColor string (hex code) #555 Start color for node color gradient
endColor string (hex code) #ccc End color for node gradient
textFillColor string (hex code) #000 Color of node labels
circleHoverStrokeColor string (hex code) #000 Color of circle outline on hover
circleHoverStrokeWidth number 3 Width of circle outline on hover in px
textFontSize number 25 Size of label font in px
padding number 100 Transition duration (ms)
zoomDurationMs number 500 Enables autoplay of pages

authors

svelte-zoomable-circles's People

Contributors

tylerb1 avatar

Stargazers

Thibault Goudouneix avatar Harry Hidayat avatar Ben Baker avatar Carsten avatar SHYAKA Davis avatar Cheah Shao Qi avatar Eduardo Stuart avatar Tane Piper avatar Mihai avatar  avatar  avatar  avatar  avatar Matt Lehrer avatar Cris avatar

Watchers

 avatar SHYAKA Davis avatar

svelte-zoomable-circles's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.