d3.js

Animate line chart in d3

两盒软妹~` 提交于 2020-08-26 09:03:08
问题 I find the example of animated line series in d3. I am trying to do the same animation in my TS code. but its not successful. // Start Animation on Click d3.select("#start").on("click", function() { var path = svg.append("path") .datum(data) .attr("class", "line") .attr("d", line); // Variable to Hold Total Length var totalLength = path.node().getTotalLength(); // Set Properties of Dash Array and Dash Offset and initiate Transition path .attr("stroke-dasharray", totalLength + " " +

How to remove weekend datetime gaps from x-axis of a financial chart?

跟風遠走 提交于 2020-08-23 07:54:08
问题 I have a use case where I pull and plot Forex data in the form of ask and bid on the graph and this is based on minute, hour or day candlesticks and I am only plotting the closing value for bid and ask as a spline . Issue The endpoints that I am using their Forex data feed is not available from Friday 8pm to Sunday 9pm . Let's say I have the following use case Plot a 200 data points (i.e. hourly candle) on the graph at a time, on new candle phase out the oldest and plot the newest The X-Axis

Labels / text on the nodes of a D3 force directed graph

[亡魂溺海] 提交于 2020-08-22 04:33:10
问题 I still not understanding why the code bellow does not display its labels / text... I have defined the css and set the attribute like the title when the move is over the node: Json: { "nodes":[ {"name":"t1","group":1}, {"name":"t2","group":1}, {"name":"t3","group":1}, {"name":"t4","group":1}, {"name":"hate","group":2}, {"name":"good","group":2}, {"name":"aiport","group":3}, {"name":"flight","group":3} ], "links":[ {"source":0,"target":4,"value":4}, {"source":0,"target":5,"value":4}, {"source"

NVD3 force specific width of bar in bar chart

走远了吗. 提交于 2020-08-21 18:55:13
问题 I am trying to get a specific width value set on a nvd3 discrete bar chart. I can change the rect elements after the initial render, but it seems like there would be some way to designate a bar width in the set-up of the chart. Here is my current chart settings. nv.addGraph -> chart = nv.models.discreteBarChart() .x (d) -> return d.label .y (d) -> return d.value .staggerLabels(false).showValues(false) .color(['#56bd78']).tooltips(false) .margin({top: 0, right: 0, bottom: 30, left: 0}) chart

List of d3 symbols available to us

£可爱£侵袭症+ 提交于 2020-08-21 05:19:27
问题 Where can I find the list of symbols made available to us by d3.js which is referred by this line of code: d3.svg.symbol().type(/*Name of the symbol type that is available to us to use*/'triangle') Some of the available symbols include triangle, diamond. Is there any documentation available anywhere where the entire list is documented. 回答1: The types supported are listed in the D3 documentation: https://github.com/mbostock/d3/wiki/SVG-Shapes#symbol_type. To quote: circle - a circle. cross - a

6月份Github上最热门的JavaScript开源项目

五迷三道 提交于 2020-08-17 01:30:13
Python实战社群 Java实战社群 长按识别下方二维码, 按需求添加 扫码关注添加客服 进Python社群▲ 扫码关注添加客服 进Java社群 ▲ 开源最前线(ID:OpenSourceTop) 猿妹整编 转载请注明来源作者 6月份GitHub上最热门的JavaScript 开源项目排行已经出炉啦, 一起来看看上榜详情吧 1 vue https://github.com/vuejs/vue Star 16048 Vue.js 是构建 Web 界面的 JavaScript 库,提供数据驱动的组件,还有简单灵活的 API,使得 MVVM 更简单。主要特性如下: 可扩展的数据绑定 将普通的 JS 对象作为 model 简洁明了的 API 组件化 UI 构建 配合别的库使用 2 lx-music-desktop https://github.com/lyswhut/lx-music-desktop Star 4479 一个基于 Electron + Vue 开发的音乐软件。UI界面如下: 3 Rocket.Chat https://github.com/RocketChat/Rocket.Chat Star 25961 Rocket.Chat使用Meteor框架做的开源消息应用。是领先的免费开源团队聊天Slack的替代品,功能强大,它支持群组聊天,直接通信,私聊群,桌面通知,媒体嵌入