如何使用javascript绘制折线图 [英] How to draw a line graph using javascript

查看:84
本文介绍了如何使用javascript绘制折线图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个要求。有没有办法用javascript创建一个折线图

。如果是,请发给我示例代码。但是这个东西

它应该适用于所有浏览器。


谢谢,

Srinivas

Hi all,
I have one requirement.Is there any way to create a line graph
using javascript.If it is please send me the sample code.But the thing
is it should work in all browsers.

Thanks,
Srinivas

推荐答案

srinivas在25年的okt 2005上写了comp.lang.javascript
srinivas wrote on 25 okt 2005 in comp.lang.javascript:
我有一个要求.Is有没有办法用javascript创建一个折线图。如果它是请给我发送示例代码。但是它应该适用于所有浏览器。
I have one requirement.Is there any way to create a line graph
using javascript.If it is please send me the sample code.But the thing
is it should work in all browsers.




对于IE和其他浏览器也是如此:


< http://groups.google.com/group/micro...ipting.jscript

/ msg / 2eb29ecafa6105bf>


-

Evertjan。

荷兰。

(替换所有十字架我的电子邮件中的点)



For IE and probably other browsers too:

<http://groups.google.com/group/micro...ipting.jscript
/msg/2eb29ecafa6105bf>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)




Evertjan。写道:

Evertjan. wrote:
srinivas写于25 okt 2005 comp.lang.javascript
srinivas wrote on 25 okt 2005 in comp.lang.javascript:
我有一个要求。有没有办法创建一个线图
使用javascript.If它是请给我发送示例代码。但是它应该适用于所有浏览器。
I have one requirement.Is there any way to create a line graph
using javascript.If it is please send me the sample code.But the thing
is it should work in all browsers.



对于IE和可能其他浏览器:

< http://groups.google.com/group/micro...ipting.jscript
/ msg / 2eb29ecafa6105bf>



For IE and probably other browsers too:

<http://groups.google.com/group/micro...ipting.jscript
/msg/2eb29ecafa6105bf>



是的,您有时可以创建建议使用JS的简单图形。

但是如果你做了很多这样的事情,或者希望绘制复杂的曲线图或

数据拟合曲线到多个点有一些分散,你需要一个数学

程序。商业节目相当昂贵。但是你可以找到一些像DataPlot这样的免费软件。这样的程序通常使用诸如Fortran或C +之类的更高级别的语言,但是它们编译得很好,因此你不需要为<安装在<...上的语言编译器。 br />
你的电脑,你不需要知道任何更高级别的b / b $ b语言来使用它们。这些程序将绘制曲线,如果需要,显示单个数据点,并给出数字单位和

标签。然后你只需使用一个图像程序将大小调整为所需的b / b $ b并以jpg或其他适合网络的格式输出。这个

方法还有一个优点,即它可以在任何可以查看jpg的浏览器上运行,即使脚本已关闭。如果您经常在网上使用图表,它还可以为您节省大量的时间。不利的一面是

,第一次学习如何使用数学程序

可能需要一些时间。


Yes, you sometimes can create a simple graph with JS as suggested.
However if you do much of this, or wish to graph complex curves or
data-fit the curve to many points with some scatter, you need a math
program. The commercial programs are rather expensive. However you can
find a few free ones such as DataPlot. Such programs usually use a
higher level language such as Fortran or C+, but they are compiled so
that you do not have to have a compiler for the language installed on
your PC, and you do not have to know anything about a higher level
language to use them. These programs will draw the curve, show
individual data points if desired, and give the numerical units and
labels. Then you just use an image program to adjust the size as
desired and output as a jpg or other format suited for the web. This
method also has the advantage that it will work on any browser that can
view a jpg, even if script is turned off. It also saves you a large
amount of time if you use plots on the web very often. The down side is
that it can take a bit of time to learn how to use the math program the
first time.


srinivas在2005年10月25日上午11:04发表以下内容:
srinivas said the following on 10/25/2005 11:04 AM:
大家好,

我有一个需求。


这是一个不可能的要求。

有没有办法用javascript创建折线图。


是。

如果是,请将示例代码发送给我。


搜索档案,进行首次尝试,在此处发布。这是一个

Usenet讨论组,而不是免费的为我做我的功课。小组。

但问题是它应该适用于所有浏览器。
Hi all,
I have one requirement.
And it is an impossible requirement.
Is there any way to create a line graph using javascript.
Yes.
If it is please send me the sample code.
Search the archives, produce your first attempt, post it here. This is a
Usenet discussion group, not a free "do my homework for me" group.
But the thing is it should work in all browsers.




那个东西是什么让你的要求变得不可能。

-

兰迪

comp.lang.javascript常见问题 - http://jibbering.com/faq &新闻组周刊



That "thing" is what makes your requirement impossible.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly


这篇关于如何使用javascript绘制折线图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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