tauCharts 是基于 D3 的,专注于数据的图表库。
散点图
var chart1 = new tauCharts.Chart({ type: 'scatterplot', x: 'milespergallon', y: 'price', data: [ {class: "C", milespergallon: 41.26, price: 24509.74, vehicle: "Prius (1st Gen)", year: 1997}, ... {class: "C", milespergallon: 37 , price: 39145 , vehicle: "Chevrolet Volt" , year: 2013} ], plugins: [ tauCharts.api.plugins.get('trendline')() ] }); chart1.renderTo('#target');