gionkunz / chartist-plugin-threshold

Threshold Plugin for Chartist.js
Do What The F*ck You Want To Public License
29 stars 38 forks source link

Issue when using High/Low entries #4

Open cotaej opened 8 years ago

cotaej commented 8 years ago

When using high/low options for chart the threshold colors don't always show:

new Chartist.Bar('#chartSF', { labels: ['WR','RP','MJ','LJ','CN','RB','SM','LB','LW','CJ','RW','MR'], series: [ [4.14035,4.27397,3.93103,3.70270,3.92105,3.77273,3.68182,3.55000,3.67500,3.61765,3.42308,3.26087] ] }, { horizontalBars: false, high: 5, low: 3, axisY: { }, plugins: [ Chartist.plugins.ctThreshold({ threshold: 3.7458541666666666666666666667 }) ] });

cotaej commented 8 years ago

Actually looks like the issue only shows when multiple charts on the same page. See below code:

<!DOCTYPE html>

```
U - Threshold value: 4.0509841666666666666666666667
EC - Threshold value: 3.6194608333333333333333333333
```
HassanYA commented 7 years ago

I have a similar issue. when I use multiple line-charts, line colors does not work as expected. However, the threshold option does not seem to be completely ignored as the colors on the points are correct.