This is a collection of unconventional D3 charts that aren't typically included in D3 graphing libraries such as C3, available as ES6 classes.
The graphs from this library can easily be embedded after being instantiated.
You got two options:
Import into Node application Embed in HTML as external script
Make sure the following packages are installed on your machine:
Within the root directory of your project run:
$ npm i -S d3-object-charts
Import a graph of your choice into app:
import SimpleSlider from 'd3-object-charts/src/slider/simple_slider';
See examples for the graph to find out about available parameters.
const simple_slider = new SimpleSlider({
container: '#simple-slider',
tick_labels: {
0: '0%',
50: '50%',
100: '100%'
},
onChange: function(new_value) {
console.log('new_value', new_value);
}
});
simple_slider.drawData({
abs_min: 0,
abs_max: 100,
current_value: 30
});
Create the container specified as `container` parameter in your template:
<div id="simple-slider"></div>
Make sure the following packages are installed on your machine:
$ git clone git@github.com:arbolista-dev/d3-object-charts.git
$ npm i
See examples for the graph to find out about available parameters.
require('./style.scss');
import SimpleSlider from './slider/simple_slider';
const simple_slider = new SimpleSlider({
container: '#simple-slider',
tick_labels: {
0: '0%',
50: '50%',
100: '100%'
},
onChange: function(new_value) {
console.log('new_value', new_value);
}
});
simple_slider.drawData({
abs_min: 0,
abs_max: 100,
current_value: 30
});
The build will create a compiled and minified bundle:
$ gulp build
// Minified stylesheets
<link href="dist/style.min.css" rel="stylesheet" type="text/css">
// Minified bundle containing D3 and chart implementation
<script charset="utf-8" src="dist/bundle.js"></script>
// Add container div to location of choice within body
<div id="simple-slider"></div>
This is a showcase of the D3 visualization components implemented as objects.
Grid chart showing one month per row. Displays the y values in different opacities of a color tone. Higher values equal a darker color.
Slider to update the data range (integer or date) dynamically. The range selection (minimum and maximum) is instantly provided as an output.
Nest a standard pie chart within another circle, whose circumference intersects at bottom left corner of graph.
Similar to a stacked bar chart, but bars all start at 0, so you can style some bars to be transparent and provide an overlapped comparative view.
Stacks a series of data into a column. Optionally shows the title and value of the dataset on hover / touch.
Interested in an application that integrates D3 charts?
Get in touch with us.
We are a group of three developers pooling over 15 years of web development experience working side by side in Mexico City. This provides us the opportunity to develop shared processes and tools for efficient and quality development - a significant advantage over individual freelancing. Currently, we are focused on development of web API services (in Ruby, Golang, and Node), as well as frontend Javascript development, mostly with with ReactJs.
Write us »