-
Notifications
You must be signed in to change notification settings - Fork 2
Chart
g0e edited this page Mar 15, 2014
·
3 revisions
var chart_instance = new ccd3.Chart(div_id, dataset)
- create chart instance.
- div_id must indicate existing id-attribute of div.
- see also [Dataset Format](Dataset Format).
chart_instance.render()
- render chart.
chart_instance.set_dataset(dataset)
- another way to setup or update dataset after instance creation.
chart_instance.setup_options(options)
- see also Options.
chart_instance.destroy()
- delete svg and div elements created by chart.
- following pattern1 & pattern2 make same results.
var chart = new ccd3.Chart("chart1",dataset);
// Pattern1
var options = {
height: 360,
width: 360,
title: { text: "Title Test" }
};
chart.setup_options(options);
// Pattern2
chart.height = 360;
chart.width = 360;
chart.title.text = "Title Test";