1.0.4 • Published 2 years ago

v3-chartjs v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

支持 Vue 的最低版本 V3.2.26

基于Chartjs

demo

  • LineChart
  • PieChart
  • DoughnutChart
  • PolarAreaChart
  • RadarChart
  • BubbleChart
  • ScatterChart
  • MixedChart
  • BarChart
  • DynamicTypeChart

属性(props)

  • options
  • chartId
  • data
	<LineChart options="*" chartId="chartRef" data="*"/>
	const addData = () => { 
		const _el=lineChartRef.value; 
		_el.update((instance)=>{ 
			instance.data.datasets[0].data.push(15);
			instance.data.labels.push("autumn") 
		}) 
	}; 

暴露的实例方法(expose instance methods)

  • getInstance
  • update
  • destroy

销毁 chart(Destroy the chart instance)

const destroyChart = () => {
  const _el = lineChartRef.value;
  _el.destroy();
};

获取图表实例(get chart's instance)

() => {
	const _el=lineChartRef.value;
	const instance=_el.getInstance();
	///instance...
};

awesome chartjs

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago