mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Fix label color in line chart.
The line chart code always defaulted to using trendLineColors for labels even when no trend lines were enabled. This commit changes that to use lineColors instead so that the labels match the lines they are for.
This commit is contained in:
parent
f17d78fd2e
commit
de9a12def5
@ -319,10 +319,10 @@ class Morris.Line extends Morris.Grid
|
||||
@options.lineColors.call(@, row, sidx, type)
|
||||
else if type is 'point'
|
||||
@options.pointFillColors[sidx % @options.pointFillColors.length] || @options.lineColors[sidx % @options.lineColors.length]
|
||||
else if type is 'line'
|
||||
@options.lineColors[sidx % @options.lineColors.length]
|
||||
else
|
||||
else if type is 'trendLine'
|
||||
@options.trendLineColors[sidx % @options.trendLineColors.length]
|
||||
else
|
||||
@options.lineColors[sidx % @options.lineColors.length]
|
||||
|
||||
drawXAxisLabel: (xPos, yPos, text) ->
|
||||
@raphael.text(xPos, yPos, text)
|
||||
|
Loading…
Reference in New Issue
Block a user