All Projects → vasturiano → icicle-chart

vasturiano / icicle-chart

Licence: MIT license
A partition / icicle interactive chart web component for visualizing hierarchical data

Programming Languages

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

Projects that are alternatives of or similar to icicle-chart

treemap-chart
A treemap interactive chart web component for visualizing hierarchical data
Stars: ✭ 27 (+0%)
Mutual labels:  hierarchical-data, d3js
react-native-d3multiline-chart
Animated Android and iOS multiline/line/scatterPoint chart based on d3.js 🤘😎🤘
Stars: ✭ 43 (+59.26%)
Mutual labels:  d3js
treetime
TreeTime is a data organisation, management and analysis tool. A tree is a hierarchical structure that arranges information in units and sub-units. TreeTime uses linked trees (one data item can be part of different distinct trees) to store and organise any general purpose data.
Stars: ✭ 26 (-3.7%)
Mutual labels:  hierarchical-data
ring-election
A node js library with a distributed leader/follower algorithm ready to be used
Stars: ✭ 92 (+240.74%)
Mutual labels:  partition
silicate
A general form for complex data
Stars: ✭ 46 (+70.37%)
Mutual labels:  hierarchical-data
Kafka Monitor
Xinfra Monitor monitors the availability of Kafka clusters by producing synthetic workloads using end-to-end pipelines to obtain derived vital statistics - E2E latency, service produce/consume availability, offsets commit availability & latency, message loss rate and more.
Stars: ✭ 1,817 (+6629.63%)
Mutual labels:  partition
Gtr Cof
Interactive music theory dashboard for guitarists. http://guitardashboard.com/
Stars: ✭ 244 (+803.7%)
Mutual labels:  d3js
kapsule
Kapsule - A closure based Web Component library
Stars: ✭ 43 (+59.26%)
Mutual labels:  d3js
ddplot
Create D3 based SVG graphics easily from R
Stars: ✭ 43 (+59.26%)
Mutual labels:  d3js
exfat clean
Clean Dirty EXFAT Partition on macOS
Stars: ✭ 27 (+0%)
Mutual labels:  partition
React Sortable Tree
Drag-and-drop sortable component for nested data and hierarchies
Stars: ✭ 4,348 (+16003.7%)
Mutual labels:  hierarchical-data
tree-vue
A lightweight library for handling hierarchical content. With full customizations of items rendering.
Stars: ✭ 25 (-7.41%)
Mutual labels:  hierarchical-data
Logi Kafkamanager
一站式Apache Kafka集群指标监控与运维管控平台
Stars: ✭ 3,280 (+12048.15%)
Mutual labels:  partition
stefano-tree
Framework agnostic Nested Set (MPTT) implementation for PHP
Stars: ✭ 24 (-11.11%)
Mutual labels:  hierarchical-data
effectiveweb.training
Repository for Effective Web Online Course / airhacks.io
Stars: ✭ 17 (-37.04%)
Mutual labels:  d3js
django-ltree-demo
A demo for storing and querying trees in Django using PostgreSQL
Stars: ✭ 85 (+214.81%)
Mutual labels:  hierarchical-data
kafkactl
CLI for Apache Kafka Management -
Stars: ✭ 78 (+188.89%)
Mutual labels:  partition
mastering-d3
Code examples for the book Mastering D3.js, published in August 2014 by Packt Publishing.
Stars: ✭ 56 (+107.41%)
Mutual labels:  d3js
Middleman-NPM
Middleman is an intuitive Express performance monitor for all your middleware 🎉
Stars: ✭ 13 (-51.85%)
Mutual labels:  d3js
echarty
Minimal R/Shiny Interface to ECharts.js
Stars: ✭ 49 (+81.48%)
Mutual labels:  hierarchical-data

icicle-chart

NPM package Build Size NPM Downloads

Also called a partition chart or a flame chart, an icicle chart visualizes a hierarchical data structure where nodes of a tree are represented by adjacent rectangles layed out progressively according to their depth.

Four orientation modes are supported for the axial direction of the nodes level: top-down, bottom-up, left-to-right and right-to-left.

Zooming interaction is available in the nodes cross-axis direction via mouse-wheel events or by clicking on a node, enabling a gradual exploration of the data. Clicking on a node zooms the view so that the node occupies the full width available. Clicking in the chart's background resets the zoom to its initial position. The chart also responds to data changes by animating the dimensions of each of the nodes into their new positions.

For improved performance, nodes with width smaller than a given threshold (minSegmentWidth) are excluded from the DOM, allowing for representation of large data sets while maintaining a smooth interaction. See here for an example of a randomly generated large data structure.

See also the Sunburst, Circle Pack and Treemap charts.

Quick start

import Icicle from 'icicle-chart';

or using a script tag

<script src="//unpkg.com/icicle-chart"></script>

then

const myChart = Icicle();
myChart
  .data(<myData>)
  (<myDOMElement>);

API reference

Method Description Default
orientation([string]) Getter/setter for the orientation of the chart. Choice between td (top-down), bu (bottom-up), lr (left-to-right), rl (right-to-left). lr
data([object]) Getter/setter for chart data (see below for syntax details).
width([number]) Getter/setter for the chart width in px. <window width>
height([number]) Getter/setter for the chart height in px. <window height>
children([string or fn]) Getter/setter for a data node's children accessor, used to establish the hierarchical relationship between nodes. Supports either a string indicating the object's property name, or a function(node) which should return an array of nodes. children
label([string or fn]) Getter/setter for a node object label accessor, used to display labels on the segments and their tooltips. name
size([string or fn]) Getter/setter for a node object size accessor, used to compute the widths of the segments. value
color([string or fn]) Getter/setter for a node object color accessor, used to color the segments. grey
nodeClassName([string or fn]) Getter/setter for a node object classname accessor. Determines the CSS class(es) to apply to each segment node.
minSegmentWidth([number]) Getter/setter for the minimum width of a segment (in px) required for it to be rendered in the DOM. 0.8
excludeRoot([boolean]) Getter/setter for whether to exclude the root node from the representation. false
sort([fn]) Getter/setter for the compare method used to sort sibling segments. A value of null (default) maintains the existing order found in the input data structure. This method is equivalent to d3-hierarchy's sort, it receives two arguments representing two sibling nodes and expects a numeric return value (-1, 0 or 1) indicating the order. Each element is an instance of d3-hierarchy node and has several useful properties to specify order: data (the corresponding data object), value (summed value of node and all its descendants) and depth (layer degree). For example, to order segments by size, use: (a, b) => b.value - a.value. <existing order>
showLabels([boolean]) Getter/setter for whether to show labels in the nodes. Regardless of this setting, labels too large to fit within a segment's width are automatically hidden. true
showTooltip([fn]) Getter/setter to specify a node object tooltip's visibility. If this function returns false for a particular node, that node's tooltip will not display at all. If unspecified, all nodes' tooltips will display. () => true
tooltipTitle([fn]) Getter/setter for a node object tooltip title. The function should return a string to be displayed in bold in the first line of the tooltip. If unspecified, the full hierarchical name will be displayed.
tooltipContent([fn]) Getter/setter for a node object tooltip content. Use this to specify extra content in each of the segment's tooltips in addition to the title set in tooltipTitle.
zoomToNode([node]) Programmatically zoom the chart to a particular node.
zoomBy([number]) Programmatically zoom the chart by a specific amount. 1 is unity, above one indicates a zoom-in and below a zoom-out.
zoomReset() Programmatically reset the zoom to the global view.
onHover([fn]) Callback function for mouse hover events. Includes the data node object (or null if hovering on background) as single argument.
onClick([fn]) Callback function for click events. Includes the data node object (or null if clicking on background) as single argument. A falsy value (default) automatically zooms on clicked nodes, equivalent to myChart.onClick(myChart.zoomToNode).
transitionDuration([number]) Getter/setter for the animation duration of transitions between states (opening, zoom in/out) in milliseconds. Enter 0 to disable animations. 800

Data syntax

{
  name: "root",
  children: [
    {
      name: "leafA",
      value: 3
    },
    {
      name: "nodeB",
      children: [
        {
          name: "leafBA",
          value: 5
        },
        {
          name: "leafBB",
          value: 1
        }
      ]
    }
  ]
}

Giving Back

paypal If this project has helped you and you'd like to contribute back, you can always buy me a !

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].