D3.js:从数据数组开始绘制简单的折线图 [英] D3.js: draw simple line graph starting from data arrays

查看:57
本文介绍了D3.js:从数据数组开始绘制简单的折线图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个数组,一个包含应该进入X轴的数据,另一个包含应该成为Y条目的数据.

I have two arrays, one containing the data which should go into the X axis, the other the data which should become the Y entries.

如何告诉d3.js从这些数组中获取数据并将其用作其图形的数据,然后绘制它?

How can I tell d3.js to take the data from those arrays and use it as data for its graph and then draw it?

推荐答案

您可以在D3之上使用任何东西吗?如果是这样,请查看 http://c3js.org .C3建立在D3的基础上,它使创建简单的图表变得更加容易.

Can you use anything on top of D3? If so, check out http://c3js.org. C3 is built on top of D3, and it makes creating simple charts much easier.

这篇关于D3.js:从数据数组开始绘制简单的折线图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆