html生成曲线图

wu_lin_326 2008-01-22 10:11:53
我有一组数据横坐标是0-6(分为1、2、3、4、5、6),纵坐标是0-60。
数据为 1(38)、2(39)、3(37)、4(34)、5(33)、6(40)。
例如1(38) 就是横坐标为1的纵坐标值为38。

想把这组数据通过html用曲线图的形式表示出来。

小弟初学,请给出代码。线等
...全文
1161 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
mengnalisha 2009-12-29
  • 打赏
  • 举报
回复
VML现在浏览器兼容是个问题
草原可可 2008-01-26
  • 打赏
  • 举报
回复
最好用VML 方便易学
seabell 2008-01-25
  • 打赏
  • 举报
回复
每个点是一个像素高宽,point.style.width="1px"; point.style.height="1px"; 可看到屏幕左上角有显示。可以把高宽调大。
octverve 2008-01-24
  • 打赏
  • 举报
回复
http://www.blogjava.net/JAVA-HE/archive/2007/07/01/127305.html
javascript 在客户端绘制图表系列三——xy坐标曲线图
wu_lin_326 2008-01-23
  • 打赏
  • 举报
回复
显示不出来
enjoyeveryday 2008-01-22
  • 打赏
  • 举报
回复
UP!!!
seabell 2008-01-22
  • 打赏
  • 举报
回复
<script>
function myload()
{
str="1(38),2(39),3(37),4(34),5(33),6(40),7(39),8(37),9(36),10(37),11(39),12(40)";
for(i=0;i<str.split(",").length;i++)
{
x=str.split(",")[i].split("(")[0];
y=str.split(",")[i].split("(")[1].split(")")[0];
point=document.createElement("div");
point.style.position='absolute';
point.style.left=x;
point.style.top=y;
point.style.width="1px";
point.style.height="1px";
point.style.overflow="hidden";
point.style.background="red";
document.getElementById("paint").appendChild(point);
}
}
</script>
<body onload=myload()>
<div id="paint"></div>

61,129

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧