mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
commit
d54a039837
@ -342,17 +342,10 @@ class Morris.Grid extends Morris.EventEmitter
|
|||||||
else
|
else
|
||||||
@left + (y - @ymin) * @dy
|
@left + (y - @ymin) * @dy
|
||||||
transX: (x) ->
|
transX: (x) ->
|
||||||
if @options.horizontal
|
|
||||||
start = @left
|
|
||||||
end = @right
|
|
||||||
else
|
|
||||||
start = @top
|
|
||||||
end = @bottom
|
|
||||||
|
|
||||||
if @data.length == 1
|
if @data.length == 1
|
||||||
(start + end) / 2
|
(@xStart + @xEnd) / 2
|
||||||
else
|
else
|
||||||
start + (x - @xmin) * @dx
|
@xStart + (x - @xmin) * @dx
|
||||||
|
|
||||||
|
|
||||||
# Draw it!
|
# Draw it!
|
||||||
|
Loading…
Reference in New Issue
Block a user