n3-charts / line-chart

Awesome charts for AngularJS.
http://n3-charts.github.io/line-chart/
MIT License
1.2k stars 180 forks source link

Is there a way to hide the legend? #534

Closed ghost closed 7 years ago

ghost commented 7 years ago

If there is, I can't find it in the code, nor in the docs. Any ideas?

chaosmail commented 7 years ago

Hi @johannds you can do a lot of awesome styling directly with CSS. You can hide the legend via

.chart-legend {
  display: none;
}

Here is a quick demo http://codepen.io/chaosmail/pen/bBaXyN

Best, Christoph

sqnkov commented 7 years ago

There appears to be a drawLegend: false option, which defaults to true but the override in the options scope does not work for me.

TempestSpectre commented 7 years ago

@sqnkov http://codepen.io/chaosmail/pen/bBaXyN

ghost commented 7 years ago

Sweet, thanks. On Wed, 21 Dec 2016 at 4:33 PM TempestSpectre notifications@github.com wrote:

@sqnkov https://github.com/sqnkov http://codepen.io/chaosmail/pen/bBaXyN

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/n3-charts/line-chart/issues/534#issuecomment-268536717, or mute the thread https://github.com/notifications/unsubscribe-auth/ANBc44D0mGjbEne4E5R-IKR9ZeFFsupWks5rKTi3gaJpZM4LCeeF .

sqnkov commented 7 years ago

@TempestSpectre , CSS works, but I was hoping for a built-in method. But hey.. CSS wroks.