Browse Source

Add sample for data.label.format - #106

pull/110/head
Masayuki Tanaka 11 years ago
parent
commit
7e89189d7b
  1. 46
      htdocs/samples/data_label_format.html

46
htdocs/samples/data_label_format.html

@ -0,0 +1,46 @@
<html>
<head>
<link href="/css/c3.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="chart"></div>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="/js/c3.js"></script>
<script>
var chart = c3.generate({
data: {
columns: [
['data1', 30, 200, 100, 400, 150, 250],
['data2', 50, 20, 10, 40, 15, 25]
],
labels: {
// format: function (v) { return "Default Format"; },
format: {
y: function (v) { return "Y Format"; },
y2: function (v) { return "Y2 Format"; }
}
},
axes: {
data1: 'y',
data2: 'y2',
}
},
axis: {
y2: {
show: true
}
},
tooltip: {
// enabled: false
},
zoom: {
// enabled: true
},
subchart: {
// show: true
}
});
</script>
</body>
</html>
Loading…
Cancel
Save