nvd3.js

How to highlight a point on a Simple Line Chart in NVD3?

本小妞迷上赌 提交于 2019-12-14 03:53:20
问题 I have a Simple Line Chart in NVD3 like this one http://nvd3.org/examples/line.html I would like to highlight (overlapping a circle for example) one particular point (a given x) on my serie. I haven't found something similar to the Highcharts addPoint() in NVD3, example: http://api.highcharts.com/highcharts#Series Moving the tooltip programmatically could work as well. Thanks in advance! 来源: https://stackoverflow.com/questions/27096252/how-to-highlight-a-point-on-a-simple-line-chart-in-nvd3

rcharts nvd3 linechart with categorical x axis

妖精的绣舞 提交于 2019-12-14 02:19:09
问题 How can I a draw a linechart with rcharts using nvd3 and a categorical xaxis? What I'm trying to do would look with ggplot2 like this: library(ggplot2) dat <- data.frame(expand.grid(group = letters[1:3], x = letters[4:6]), y = rnorm(9)) ggplot(dat, aes(x = x, y = y, group = group, color = group)) + geom_line() I tried: library(rCharts) nPlot(y ~ x, group = 'group', data = dat, type = 'lineChart') I know that I could change x to a numeric variable, but then the xaxis labels would not be

NVD3 - uneven ticks when updating data

怎甘沉沦 提交于 2019-12-14 01:03:52
问题 When I update the data in an existing NVD3 chart, the ticks along the x-axis are not rendering at fixed intervals. I'm creating a multiBarChart with data sourced from d3.json() . The data represents hits over a date range. I have a separate date range picker which updates the chart's data. I have the following to create the graph (simplified): initGraph = function(url) { d3.json(url, function(data) { nv.addGraph(function() { chart = nv.models.multiBarChart(); d3.select('#chart svg').datum

Change line type in rCharts NVD3 (nPlot)

别等时光非礼了梦想. 提交于 2019-12-13 06:53:27
问题 I would like to have both solid and dashed lines for different levels of a factor (grouping variable) in a plot created with nPlot. Any suggestions? library(reshape2) library(ggplot2) library(rCharts) ecm <- reshape2::melt(economics[,c('date', 'uempmed', 'psavert')], id = 'date') p7 <- nPlot(value ~ date, group = 'variable', data = ecm, type = 'lineWithFocusChart') Final result: uempmed (solid line) and psavert (dashed line) Another option could be to change the thickness of the lines instead

Problems while displaying nvd3 pieChart in a pop up window?

扶醉桌前 提交于 2019-12-13 06:49:56
问题 I am opening nvd3 pieChart in a popup window. I create popup window like this: function openPopup(html,pos,style) { var newWindow = window.open(''); newWindow.document.write(html); return newWindow; } function openChartPopup(chartID,chartTitle) { divId = "div" + chartID; html = "<p>"+chartTitle+"</p><div id= \""+divId+"\"><svg id=\""+chartID+"\"></svg></div>"; newWindow = openPopup(html,"_blank",""); return d3.select(newWindow.document.getElementById(chartID)); } then I create a pieChart

can't display New_York time on x axis D3 | angular-nvd3

点点圈 提交于 2019-12-13 03:55:35
问题 Can’t display East [NY] time on the x axis. I’m using Angular-nvD3 lib to display the chart Time comes in unixtime i.e 1544693400, 1544693700 and displayed like so: tickFormat: function(d) { return d3.time.format('%H:%M')(new Date(d * 1000)); } 来源: https://stackoverflow.com/questions/53772919/cant-display-new-york-time-on-x-axis-d3-angular-nvd3

Uncaught TypeError: Cannot read property 'showBarChart' of undefined in React

痴心易碎 提交于 2019-12-13 02:49:12
问题 I have a function that customizes tooltip of nvd3 scatterChart plot. In the function I want to update state, so I am calling another function that does setState : chart.tooltip.contentGenerator(function (d) { var html = "<div>"; d.series.forEach(function(elem){ Object.keys(data_obj).forEach(function(key_1) { var outer_obj = data_obj[key_1]; if (outer_obj["key"] === elem.key) { // THIS FUNCTION UPDATES STATE this.showBarChart(elem.key); var expr = outer_obj["values"][0]["expr"]; html += "<p>"

how to use nvd3.js charts with RaphaelJS for internet explorer

扶醉桌前 提交于 2019-12-13 02:27:26
问题 Following to this nvd3-js-rendering-solution-for-internet-explorer any examples on how to use nvd3.js charts with RaphaelJS for internet explorer which does not support SVG Or any links to use PhantomJS with NVD3. simmilar to HighChartJS I am working on to use Phantom.js to conver nvd3 graphs, but wondering if anyone here has already invented this wheel.. this is my jsbin link for Piechart Update Ok using Phantom rasterize.js i am able to convert my html page into png. Example phantomjs

I am trying to get NVD3 to work with data from an ajax request

隐身守侯 提交于 2019-12-13 02:25:42
问题 I am trying to accomplish this stacked area graph using NVD3.js: http://nvd3.org/examples/stackedArea.html I have made a webservice that connects to my veterinarian sql server using visual studio. It works when tested separately. I want to present the number of daily new clinical cases. I am new to D3 and NVD3. However, both libraries look amazing. I have tried to look at other posts and tutorials, but I am confused. Essentially, I tried to copy-and-paste the example code. My JSON format is:

Circles on nvd3 line chart

余生颓废 提交于 2019-12-13 00:15:54
问题 I need to add circules/nodes to each point on a line chart of nvd3. I have my codes here - https://jsfiddle.net/sujit77/7ns2g4a1/12/ Also I need to have these circles with different colors depending on value at that point. I tried to follow "http://www.d3noob.org/2013/01/change-line-chart-into-scatter-plot.html". But messed up my code between D3 and nvd3 functions. nv.addGraph(function() { var chart = nv.models.lineChart() .x(function(d) { return d3.time.format("%Y-%m-%d %H:%M:%S").parse(d[