All Projects → kbravi → modest_canvas

kbravi / modest_canvas

Licence: MIT license
Some useful chart modules with d3js

Programming Languages

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

Projects that are alternatives of or similar to modest canvas

React D3 Graph
Interactive and configurable graphs with react and d3 effortlessly
Stars: ✭ 541 (+2905.56%)
Mutual labels:  graphs, d3js
deep-hyperedges
New Algorithms for Learning on Hypergraphs
Stars: ✭ 21 (+16.67%)
Mutual labels:  graphs
compareBars
Simplify comparative bar charts 📊
Stars: ✭ 28 (+55.56%)
Mutual labels:  d3js
weltschmerz
Weltschmerz by age - "I am X years old and... [Google autocomplete]"
Stars: ✭ 23 (+27.78%)
Mutual labels:  d3js
Leetcode-solutions
Leetcode Grinder.
Stars: ✭ 14 (-22.22%)
Mutual labels:  graphs
d3-brush-multiple
This is an implementation of multiple brushes in D3js version 4.
Stars: ✭ 17 (-5.56%)
Mutual labels:  d3js
SortVis
https://airtucha.github.io/SortVis
Stars: ✭ 23 (+27.78%)
Mutual labels:  d3js
visualisation-lab
An experimental visualisation workbench built using Svelte
Stars: ✭ 17 (-5.56%)
Mutual labels:  d3js
tw-family-names
台灣姓氏分佈地圖 Taiwan Family Name Map
Stars: ✭ 36 (+100%)
Mutual labels:  d3js
d3-force-apex-plugin
Oracle APEX Region Type Plugin: D3 Force Network Chart
Stars: ✭ 22 (+22.22%)
Mutual labels:  d3js
Erdos.jl
A library for graph analysis written Julia.
Stars: ✭ 37 (+105.56%)
Mutual labels:  graphs
GraphIO.jl
Graph IO functionality for various formats.
Stars: ✭ 54 (+200%)
Mutual labels:  graphs
grandiso-networkx
Performant, pure-Python subgraph isomorphism and monomorphism search (aka "motif search")
Stars: ✭ 30 (+66.67%)
Mutual labels:  graphs
d3js-threejs-integration
D3js - threejs examples
Stars: ✭ 17 (-5.56%)
Mutual labels:  d3js
graphframes
R Interface for GraphFrames
Stars: ✭ 36 (+100%)
Mutual labels:  graphs
CondGen
Conditional Structure Generation through Graph Variational Generative Adversarial Nets, NeurIPS 2019.
Stars: ✭ 46 (+155.56%)
Mutual labels:  graphs
D3Fire
Power your D3 visualizations with data from Firebase
Stars: ✭ 31 (+72.22%)
Mutual labels:  d3js
nxontology
NetworkX-based Python library for representing ontologies
Stars: ✭ 45 (+150%)
Mutual labels:  graphs
d3js-neo4j-example
Some of D3.js v5 example pages visualize the result from Neo4j
Stars: ✭ 37 (+105.56%)
Mutual labels:  d3js
plotex
Elixir plotting utilities library
Stars: ✭ 74 (+311.11%)
Mutual labels:  graphs

Modest Canvas

Some useful chart modules using d3js (v4).

  • Renders svg, so no loss of resolution when zoomed
  • Supports window resize and adapts to the width of the parent

Donut Chart

  • Create pretty interactive donut charts
  • Supports onclick attributes
  • Bounce on mouse out
  • Automatic sizing of fonts based on the width of chart container

Illustration

Usage

jsfiddle

<head>
  <script type="text/javascript" src="https://github.com//path/to/d3.v4.min.js"></script>
  <script type="text/javascript" src="https://github.com//path/to/donut_chart.js"></script>
  <link rel="stylesheet" type="text/css" href="https://github.com//path/to/donut_chart.css">
</head>
<div class="chart_container"></div>
<script type="text/javascript">
  var dataJson = {
    values: [
      {
        category: "California",
        value: 256,
        color: '#428ab5',
        onclick: "console.log('clicked California');",
        center_subtext: "Category: California"
      },
      {
        category: "Oregon",
        value: 123,
        color: '#A7A7A7',
        onclick: "console.log('clicked Oregon');",
        center_subtext: "Category: Oregon"
      },
      {
        category: "Unknown",
        value: 55,
        color: "#CECECE",
        center_subtext: "Category: Unknown"        
      }
    ],
    center_text: {
      enabled: true,
      text: "CenterText",
      color: '#428ab5'
    },
    center_subtext: {
      enabled: true,
      color: '#428ab5',
      text: "center sub text"
    },
    center_circle: {
      enabled: true,
      color: '#428ab5'
    }
  }
  var options = {
    // Automatically create a color gradient from red to blue when colors are not assigned to values
    minCategoryFillColor: "red",
    minCategoryFillColor: "blue",
    // Automatically adjust the font size of the center text and subtext based on the size of the chart
    maxCenterSubtextFontSize: 18,//px
    maxCenterTextFontSize: 18,//px
  }
  ModestCanvas.donutChart(".chart_container", dataJson, options);
</script>

Scatter Plot

  • Interactive
  • Supports onclick attributes

Illustration

Usage

jsfiddle

<head>
  <script type="text/javascript" src="https://github.com//path/to/d3.v4.min.js"></script>
  <script type="text/javascript" src="https://github.com//path/to/scatter_plot.js"></script>
  <link rel="stylesheet" type="text/css" href="https://github.com//path/to/scatter_plot.css">
</head>
<div class="chart_container"></div>
<script type="text/javascript">
  var dataJson =  {
    values: [
      {
        coordinates: {
          x: -0.5,
          y: 33,
        },
        point: {
          attributes: {
            onclick: "console.log('clicked -0.5');"
          }
        },
        tooltip: {
          text: "Sentiment ID #1234",
        }
      },
      {
        coordinates: {
          x: 0.9,
          y: 13
        },
        point: {
          attributes: {
            onclick: "console.log('clicked 0.9');"
          }
        },
        tooltip: {
          text: "Sentiment ID #1233",
        }
      }
    ],
    tooltip: {
      enabled: true,
    },
    axes: {
      enabled: true,
      x: {
        label: "Polarity",
        custom_ticks: {"-1": "Negative", "0": "Neutral", "1": "Positive"}
      },
      y: {
        label: "Magnitude"
      }
    },
    legend: {
      enabled: true,
      domain: [
        {for: -1, label: "Negative"},
        {for: 0, label: "Neutral"},
        {for: 1, label: "Positive"},
      ]
    },
    colors: {
      x_based: true,
      y_based: false,
      domain: [-1, 1]
    }
  }
  var options = {
    // Automatically create a color gradient for the circles
    minCircleFillColor: "#000000",
    maxCircleFillColor: "#BBBBBB",
  }
  ModestCanvas.scatterPlot(".chart_container", dataJson, options);
</script>

Word Cloud

Illustration

Usage

jsfiddle

<head>
  <script type="text/javascript" src="https://github.com//path/to/d3.v4.min.js"></script>
  <script type="text/javascript" src="https://github.com//path/to/word_cloud.js"></script>
  <link rel="stylesheet" type="text/css" href="https://github.com//path/to/word_cloud.css">
</head>
<div class="chart_container"></div>
<script type="text/javascript">
  var dataJson =  [
    {
      category: 'Animals',
      word: 'Lion',
      frequency: 123,
    },
    {
      category: 'Birds',
      word: 'Pigeon',
      frequency: 222
    },
    {
      category: 'Animals',
      word: 'Snow Leopard',
      frequency: 22
    },
    {
      category: 'Animals',
      word: 'Fox',
      frequency: 3,
    },
    {
      category: 'Birds',
      word: 'Parrot',
      frequency: 99
    },
    {
      category: 'Animals',
      word: 'Rabbit',
      frequency: 939
    }
  ]
  var options = {
    // Automatically create a color gradient for the words based on categories
    minCategoryFillColor: "#000000",
    maxCategoryFillColor: "#BBBBBB",
    hideCategoryAxis: true
  }
  ModestCanvas.wordCloud(".chart_container", dataJson, options);
</script>

Edge Bundling

  • Inspired by the work of Mike Bostock with minor improvements
  • Hovering over a node will color the out edges and display the weight

Illustration

Usage

jsfiddle

<head>
  <script type="text/javascript" src="https://github.com//path/to/d3.v4.min.js"></script>
  <script type="text/javascript" src="https://github.com//path/to/edge_bundling.js"></script>
  <link rel="stylesheet" type="text/css" href="https://github.com//path/to/edge_bundling.css">
</head>
<div class="chart_container"></div>
<script type="text/javascript">
  var dataJson =  [
    {
      name: "Tag 1",
      edges: [
        {
          name: "Tag 2",
          weight: 123
        },
        {
          name: "Tag 3",
          weight: 12
        },
      ]
    },
    {
      name: "Tag 2",
      edges: [
        {
          name: "Tag 1",
          weight: 66
        },
        {
          name: "Tag 3",
          weight: 35
        },
      ]
    },
    {
      name: "Tag 3",
      edges: [
        {
          name: "Tag 1",
          weight: 55
        },
        {
          name: "Tag 2",
          weight: 1
        },
      ]
    }
  ]
  ModestCanvas.edgeBundling(".chart_container", dataJson);
</script>

License

MIT

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