ngx-charts icon indicating copy to clipboard operation
ngx-charts copied to clipboard

Reference Lines in Bar chart

Open AlisonVilela opened this issue 6 years ago • 16 comments

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

AlisonVilela avatar Nov 27 '18 19:11 AlisonVilela

This would be an awesome feature!

damasioalexandre avatar Feb 22 '19 06:02 damasioalexandre

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.

jackled avatar Mar 05 '19 14:03 jackled

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

BarChart

AlisonVilela avatar Mar 12 '19 14:03 AlisonVilela

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

sDeVette avatar May 16 '19 08:05 sDeVette

any updates on this?

rube-de avatar Feb 13 '20 09:02 rube-de

@AlisonVilela can you please post your solution?

TonySpegel avatar Feb 18 '20 13:02 TonySpegel

@AlisonVilela would you mind sharing your implementation ?

EmreAkkoc avatar May 12 '20 12:05 EmreAkkoc

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"

kolya-kra avatar Oct 08 '20 14:10 kolya-kra

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

EvaristoPerez avatar Mar 31 '21 19:03 EvaristoPerez

Can we support this?

nghiado avatar Apr 15 '21 20:04 nghiado

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

yusukemetroly avatar Apr 23 '21 07:04 yusukemetroly

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

carlosamn avatar Jun 22 '21 03:06 carlosamn

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

carlosamn avatar Jun 22 '21 03:06 carlosamn

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

kallekj avatar Sep 08 '21 15:09 kallekj

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

ThomasHehenb avatar Nov 15 '22 12:11 ThomasHehenb

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

bobbyg603 avatar Nov 29 '23 22:11 bobbyg603