novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.14k forks source link

Line chart plots with dataLabels #1809

Open SubhuMS opened 8 years ago

SubhuMS commented 8 years ago

Hi, is that possible to display line chart with datalabels as shown in the picture below, linechart

liquidpele commented 8 years ago

try chart.showLabels(true)

SubhuMS commented 8 years ago

Hi @liquidpele, i tried like this,

<NVD3Chart type='lineChart' id="lineChart" datum={data} showLabels="true" /> could you please tell me how to define the labels in datum?

liquidpele commented 8 years ago

That looks like angular-nvd3, I'm not familiar with doing it through an angular directive.

SubhuMS commented 8 years ago

This is react-nvd3, i tried like this in react, please let me know how to construct the data with labels for lineChart, will try the same in react-nvd3

liquidpele commented 8 years ago

there is a showLabels option, so as I said you can maybe just do chart.showLabels(true) in pure javascript. I have no idea how react-nvd3 works, you'd have to ask that project how to use options.

leebailey88 commented 8 years ago

chart.showLabels(true) is not working for me

liquidpele commented 8 years ago

Hmm, maybe a bug then.

kalimuthu123 commented 5 years ago

datalabelss we want in nvd3 can anyone suggest