Giter Site home page Giter Site logo

vitaly-z / ringchart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from analyzer2004/ringchart

0.0 0.0 0.0 722 KB

It's radial bump chart, radar chart, and circular heatmap!!

Home Page: https://observablehq.com/@analyzer2004/ringchart

License: Other

JavaScript 100.00%

ringchart's Introduction

Ring Chart

The original concept of RingChart was to create a radial bump chart that is suitable for showing a larger dataset over a more extended period in a single view. A standard bump chart is excellent for displaying 15 to maybe 30 ticks. But what if you need to present a 3-month dataset in an interpretable fashion?

By utilizing the circular design, the chart becomes capable of displaying more data without compromising visual quality. As the demo below, the RingChart neatly visualizes a 90-day dataset in an exquisite style.

For live demos and sample codes, please see Ring Chart

API Reference

  • RingChart(container) - Constructs a new instance of RingChart with default settings. The container can be an svg or g element.
  • size([width, height]) - Sets the dimensions to specified width and height and returns this chart.
  • innerRadius(_) - Sets the chart's inner radius and returns this chart.
  • palette(_) - Sets the color palette to a categorical scheme (for rankmap) or a continuous interpolator (heatmap) and returns this chart.
  • options(options) - Overrides the default settings and returns this chart.
    • options.order - sets the sort order to "asc" or "desc". Default is ascending.
    • options.nodeStyle - specifies the node styles. Available styles are "arc", "circle" and "square". Default is arc.
    • options.chartType - sets the chart type to "rankmap" (bump chart) or "heatmap". Default is heatmap.
    • options.clickAction - specifies the click action to "none" or "highlight". Default is highlight.
    • options.stickNodes - specifies whether the nodes are always stick together if the nodeStyle is circle or square. Default is true.
    • options.showZeros - specifies whether the nodes with zero value should be plotted. Default is true.
    • options.alwaysShowLines - specifies whether the rank lines are always displayed. By turning this option on the chart becomes a radar chart. The default value is false.
    • options.fixedNodeRadius - specifies a fixed radius for nodes.
  • legend(legend) - Overrides the legend settings and returns this chart.
    • legend.enabled - a boolean value that indicates whether the legend is enabled or disabled. Default is true.
    • legend.centered - specifies whether the legend is placed at the center of the ring. Default is true.
    • legend.fontSize - sets the legend's font size.
    • legend.format - sets the legend's number format. (for heatmap)
    • legend.labelColor - sets the legend's text color.
    • legend.num - sets the number of legend items. (for heatmap)
  • tick(tick) - Overrides the tick settings and returns this chart.
    • tick.name - sets the column name of ticks
    • tick.isDate - specifies whether the tick column is Date
    • tick.format - sets the format (d3.timeParse) for parsing the tick column. Default is empty.
    • tick.fontSize - sets the tick's font size
    • tick.color - sets the tick's text color
  • data(_) - Sets the data and returns this chart.
  • render() - Renders the chart and returns it's instance.
  • onhover(d) - Occurs when user hover over a node or a legend item.
  • onclick(d) - Occurs when user click on a node or a legend item.
  • oncancel() - Occurs when cancelling the locked highlight.`

ringchart's People

Contributors

analyzer2004 avatar

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.