{"id":7537,"date":"2015-07-26T05:11:47","date_gmt":"2015-07-26T05:11:47","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/07\/26\/is-an-nvd3-line-plot-with-markers-possible-open-source-projects-novus-nvd3\/"},"modified":"2015-07-26T05:11:47","modified_gmt":"2015-07-26T05:11:47","slug":"is-an-nvd3-line-plot-with-markers-possible-open-source-projects-novus-nvd3","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/07\/26\/is-an-nvd3-line-plot-with-markers-possible-open-source-projects-novus-nvd3\/","title":{"rendered":"Is an NVD3 Line Plot with Markers Possible?-open source projects novus\/nvd3"},"content":{"rendered":"<p>I&#8217;m making an NVD3 line plot that will have significantly improved clarity if I can get markers to show for each data point instead of just the line itself. Unfortunately, I haven&#8217;t been able to find an easy way to do this with NVD3 yet. I also considered using a scatter plot, but I couldn&#8217;t figure out how to show connecting lines between the points. A third option I considered was to overlay a line and scatter plot, but this would show each series twice in the legend and may cause other unnecessary visual complications.<\/p>\n<p>Is there a way to elegantly pull this off yet? Sample code of my formatting technique is listed below, but the &#8216;size&#8217; and &#8216;shape&#8217; attributes in test_data have no effect on the line plot with the current code.<\/p>\n<pre><code>test_data = [ {     key: 'series1',\n            values: [\n                { x: 1, y: 2.33, size:5, shape:\"circle\" },\n                { x: 2, y: 2.34, size:5, shape:\"circle\" },\n                { x: 3, y: 2.03, size:5, shape:\"circle\" },\n        ] } ];\n\n\nnv.addGraph(function() {\n  var test_chart = nv.models.lineChart();\n  test_chart.xAxis.axisLabel('Sample Number');\n  test_chart.yAxis\n        .axisLabel('Voltage (V)')\n        .tickFormat(d3.format('.02f'));\n\n  d3.select('#test_plot')\n      .datum(test_data)\n    .transition().duration(500)\n      .call(test_chart);\n\n  nv.utils.windowResize(test_chart.update);\n  return test_chart;\n});\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m making an NVD3 line plot that will have significantly improved clarity if I can get markers to show for each data point instead of just the line itself. Unfortunately, I haven&#8217;t been able to find an easy way to do this with NVD3 yet. I also considered using a scatter plot, but I couldn&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7537","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7537"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7537\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}