swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.29k stars 1.15k forks source link

[Feature] Show X and Y axis (the actual line) #152

Open stephanrauh opened 7 years ago

stephanrauh commented 7 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here

Current behavior Currently, the line chart is always drawn without the lines or arrows indicating the X and Y axis. While this looks just awesome, modern and fresh, I (and my business department) sometimes need the X and Y axis because it helps us to read the diagram. For instance, the lines allow us to align a triangle ruler.

Expected behavior I'd like to contribute a pull request adding the option to draw the X and/or the Y axis. Of course, the lines should remain invisible by default in order to maintain backward compatibility.

Reproduction of the problem Draw a line chart with ngx-charts :).

What is the motivation / use case for changing the behavior?

Please tell us about your environment: not relevant - this is about ngx-charts itself

marjan-georgiev commented 7 years ago

This shouldn't be hard to add. XAxisComponent and XAxisComponent would need to be modified by adding the lines to them.

I'm not sure if this should be an input or just something that can be done by overriding CSS. I would make them invisible by default, and users would be able to override the CSS to make them visible. This is open for discussion though.

ErvinLlojku commented 6 years ago

@marjan-georgiev Can you please elaborate on your answer? How can i modify the XAxisComponent and if you have just a piece of code on how to integrate this? Thank you

Ratikant01 commented 6 years ago

anybody got this working? Please provide a sample code for this.

stephanrauh commented 6 years ago

@ErvinLlojku After a long pause, I've returned to D3.js programming. No promises, but chances are I'll submit my pull request soon.