//dashactivity trafic source data_list & pie_chart
This commit is contained in:
@@ -70,37 +70,4 @@
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var testdata = [
|
||||
{
|
||||
key: "Direct Link",
|
||||
y: 5
|
||||
},
|
||||
{
|
||||
key: "Google.com",
|
||||
y: 2
|
||||
},
|
||||
{
|
||||
key: "Facebook.com",
|
||||
y: 9
|
||||
}
|
||||
];
|
||||
|
||||
nv.addGraph(function() {
|
||||
var chart = nv.models.pieChart()
|
||||
.x(function(d) { return d.key })
|
||||
.y(function(d) { return d.y })
|
||||
.color(d3.scale.category10().range())
|
||||
.donut(true)
|
||||
.showLabels(false)
|
||||
.showLegend(false);
|
||||
d3.select("#dash_traffic_chart2 svg")
|
||||
.datum(testdata)
|
||||
.transition().duration(1200)
|
||||
.call(chart);
|
||||
nv.utils.windowResize(chart.update);
|
||||
return chart;
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
Reference in New Issue
Block a user