d3js适合做股票软件
1. c#winform中能做出类似于d3js的效果的动态风向图吗
可以http://blog.csdn.net/xianfajushi/article/details/9469353
2. 数据可视化前端(D3.js)有前途吗
前途肯定有的,但是得看公司,不是每个公司都会大范围用到这些图形图表库
3. 如何使用d3.js制作可视化图表
D3是目前最流行的JavaScript可视化图表库之一,D3的图表类型非常丰富,并且支持SVG格式,因此应用十分广泛,也有很多图表插件基于D3开发,比如MetricsGraphics.js,在D3上构建的数据图表非常强大。
D3的特点
允许绑定任意数据到DOM,将数据驱动转换应用到Document中。
不仅可以创建精美的HTML表格,而且可以绘制折线图、柱形图和饼图等数据图表。
支持SVG,在Web页面上渲染毫无压力。
回到顶部
D3的使用方法
关于D3的具体用法,可以看D3图形库API参考这篇文章。本文主要对介绍一些经典图表的实现效果及代码。
<!DOCTYPEhtml>
<metacharset="utf-8">
<style>
svg{
font:10pxsans-serif;
}
.y.axispath{
display:none;
}
.y.axisline{
stroke:#fff;
stroke-opacity:.2;
shape-rendering:crispEdges;
}
.y.axis.zeroline{
stroke:#000;
stroke-opacity:1;
}
.title{
font:30078pxHelveticaNeue;
fill:#666;
}
.birthyear,
.age{
text-anchor:middle;
}
.birthyear{
fill:#fff;
}
rect{
fill-opacity:.6;
fill:#e377c2;
}
rect:first-child{
fill:#1f77b4;
}
</style>
<body>
<scriptsrc="http://d3js.org/d3.v3.min.js"></script>
<script>
varmargin={top:20,right:40,bottom:30,left:20},
width=960-margin.left-margin.right,
height=500-margin.top-margin.bottom,
barWidth=Math.floor(width/19)-1;
varx=d3.scale.linear()
.range([barWidth/2,width-barWidth/2]);
vary=d3.scale.linear()
.range([height,0]);
varyAxis=d3.svg.axis()
.scale(y)
.orient("right")
.tickSize(-width)
.tickFormat(function(d){returnMath.round(d/1e6)+"M";});
//AnSVGelementwithabottom-rightorigin.
varsvg=d3.select("body").append("svg")
.attr("width",width+margin.left+margin.right)
.attr("height",height+margin.top+margin.bottom)
.append("g")
.attr("transform","translate("+margin.left+","+margin.top+")");
//.
varbirthyears=svg.append("g")
.attr("class","birthyears");
//Alabelforthecurrentyear.
vartitle=svg.append("text")
.attr("class","title")
.attr("dy",".71em")
.text(2000);
d3.csv("population.csv",function(error,data){
//Convertstringstonumbers.
data.forEach(function(d){
d.people=+d.people;
d.year=+d.year;
d.age=+d.age;
});
//.
varage1=d3.max(data,function(d){returnd.age;}),
year0=d3.min(data,function(d){returnd.year;}),
year1=d3.max(data,function(d){returnd.year;}),
year=year1;
//Updatethescaledomains.
x.domain([year1-age1,year1]);
y.domain([0,d3.max(data,function(d){returnd.people;})]);
//[male,female].
data=d3.nest()
.key(function(d){returnd.year;})
.key(function(d){returnd.year-d.age;})
.rollup(function(v){returnv.map(function(d){returnd.people;});})
.map(data);
//.
svg.append("g")
.attr("class","yaxis")
.attr("transform","translate("+width+",0)")
.call(yAxis)
.selectAll("g")
.filter(function(value){return!value;})
.classed("zero",true);
//(sothatnoenterorexitisrequired).
varbirthyear=birthyears.selectAll(".birthyear")
.data(d3.range(year0-age1,year1+1,5))
.enter().append("g")
.attr("class","birthyear")
.attr("transform",function(birthyear){return"translate("+x(birthyear)+",0)";});
birthyear.selectAll("rect")
.data(function(birthyear){returndata[year][birthyear]||[0,0];})
.enter().append("rect")
.attr("x",-barWidth/2)
.attr("width",barWidth)
.attr("y",y)
.attr("height",function(value){returnheight-y(value);});
//Addlabelstoshowbirthyear.
birthyear.append("text")
.attr("y",height-4)
.text(function(birthyear){returnbirthyear;});
//Addlabelstoshowage(separate;notanimated).
svg.selectAll(".age")
.data(d3.range(0,age1+1,5))
.enter().append("text")
.attr("class","age")
.attr("x",function(age){returnx(year-age);})
.attr("y",height+4)
.attr("dy",".71em")
.text(function(age){returnage;});
//.
window.focus();
d3.select(window).on("keydown",function(){
switch(d3.event.keyCode){
case37:year=Math.max(year0,year-10);break;
case39:year=Math.min(year1,year+10);break;
}
update();
});
functionupdate(){
if(!(yearindata))return;
title.text(year);
birthyears.transition()
.ration(750)
.attr("transform","translate("+(x(year1)-x(year))+",0)");
birthyear.selectAll("rect")
.data(function(birthyear){returndata[year][birthyear]||[0,0];})
.transition()
.ration(750)
.attr("y",y)
.attr("height",function(value){returnheight-y(value);});
}
});
4. cytoscape.js 和d3.js哪个好用
d3.js 好用
cytoscape.js
只是网络图
5. 用作数据可视化,echarts 和 D3.js哪个好
这两个都没用过,我一般都是用finebi来分析我的数据,最后在Dashboard里面查看可视化的图表结果,而且可以很方便地切换维度,联动钻取等
6. webgl、three.js、D3.js这三者是什么关系
webgl、three.js、D3.js这三者的关系是:
1、D3.js是一个数据可视化的库,看看他们的DEMO就可以知道,技术基础是SVG。兼容性是IE9+。
2、webgl是HTML5中提出的新技术,是一种3D绘图标准,这种绘图技术标准允许把JavaScript和OpenGL ES 2.0结合在一起,关于它的教程可以看看hiwebgl。目前兼容性堪忧
3、three.js是以webgl为基础的库,封装了一些3D渲染需求中重要的工具方法与渲染循环。它的教程同样可以在hiwebgl里面找到。
4、three.js之于webgl,类似于windows版本的虚幻引擎之于D3D。当然,虚幻引擎的能力范围比three.js大得多。d3.js跟上面两者没有关系。
7. 怎么用d3.js 制作3d效果
1,建立一个扩展名为js的文件,比如myjs.js
2,复制和中间的js代码到这个文件中,然后保存!
3,在你的html页面中加入js引用代码:
注意:在引用js一定要注意路径问题,你可以在你的网站根目录中建一个文件夹,比如:js然后把js文件复制进行
8. 如何使用d3.js 看到用D3做的酷图,很想学,有没有高手教一下
去官网安装个摄像头的驱动 活着直接网络暗转个万能驱动啊 ...1、 确认驱动安装正确 2、 在 我的电脑 里面有没有视频或者照相机的标志,能否使用 3、 ...
9. d3.js可以做什么
d3js能够将资料制作成各种图表,将资料视觉化,有兴趣的话可以去github上d3js的repository看更多范例demo.
举例来说,你如果想在地图上随着人口分布,变换地图区块颜色,d3js就可以办到.