2

I want to create a line chart with custom markers with nvd3.js library as shown in the following example:

enter image description here

Is there a way to configure the chart using the chart config object? or should I modify the lineChart from the nvd3 library to achieve this? if so, any clues on how should I update it?

fons
  • 94
  • 1
  • 4
  • By "markers", you're talking about changing the green triangles and red Xs, correct? – Harris Dec 13 '16 at 17:05
  • Yes, correct :) – fons Dec 13 '16 at 17:13
  • Have you tried just using CSS? – Harris Dec 13 '16 at 17:19
  • nvd3 is using svg paths to render the markers. They have a CSS class attach to all the markers. – fons Dec 13 '16 at 17:46
  • You can override their CSS and/or attach pseudo-class elements to display what you want. – Harris Dec 13 '16 at 17:53
  • This is how the marker looks like: `` so I think overriding their CSS and/or attaching pseudo-class elements won't work.. I am afraid I will have to dig into the code and see where those paths and transform properties are generated. – fons Dec 13 '16 at 18:18
  • or could I somehow replace the `d` path by a background image using CSS? – fons Dec 13 '16 at 18:20

0 Answers0