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

Reference Lines in Bar chart #1046

Open AlisonVilela opened 5 years ago

AlisonVilela commented 5 years ago

Originally posted by @marjan-georgiev in https://github.com/swimlane/ngx-charts/pull/422#issuecomment-309456263

damasioalexandre commented 5 years ago

This would be an awesome feature!

jackled commented 5 years ago

Yes, absolutely. Any idea when this is coming? The research project I'm working on requires background reference lines in bar graphs. I'm certain that this feature would make a number of people very happy.

AlisonVilela commented 5 years ago

I implemented this feature locally a while ago, because I needed it so much, I can do a PR with these modifications

BarChart
sDeVette commented 5 years ago

@AlisonVilela I would love to see a PR for this, or just your implementation would also be very helpful! Thanks in advance

rube-de commented 4 years ago

any updates on this?

TonySpegel commented 4 years ago

@AlisonVilela can you please post your solution?

EmreAkkoc commented 4 years ago

@AlisonVilela would you mind sharing your implementation ?

kolya-kra commented 3 years ago

I faced the same issue. My solution might not be the cleanest but it worked. You can create a new component and copy the ngx-bar-chart component from the ngx-charts-Module into it. Then add the following 3 lines to the ngx-charts-y-axis:

[referenceLines]="referenceLines"
[showRefLines]="showRefLines"  
[showRefLabels]="showRefLabels"
EvaristoPerez commented 3 years ago

Thanks kolya-kra I just did this with stacked bar chart and works like a charm. If somebody need it I can send more info.

image

nghiado commented 3 years ago

Can we support this?

yusukemetroly commented 3 years ago

@EvaristoPerez hi can you please share what you did? We are running into the same problem. thanks!

carlosamn commented 3 years ago

@EvaristoPerez Hi, is there any repo where we can check it out ? or at least any guide? Thanks

carlosamn commented 3 years ago

@kolya-kra Hi, Can you share any progress or support us with a guide pls? Thanks!

kallekj commented 3 years ago

Hi, @EvaristoPerez and @kolya-kra! Is it possible for you to share a gist with the code? Many thanks!

ThomasHehenb commented 1 year ago

Hi, is there any possibility to get a PR? @AlisonVilela

bobbyg603 commented 10 months ago

We've published a version of ngx-charts that includes @kedij777's reference line support. You can use it by installing @bugsplat/ngx-charts@20.7.0.