fix series_annotations for bar (#3742)
* fix series_annotations for bar * fix my typos in bar recipe * fix fillrange of annotation series for groupedbar * fix series_annotations for bar * fix my typos in bar recipe * fix fillrange of annotation series for groupedbar * fix series_annotations for bar * fix my typos in bar recipe * fix fillrange of annotation series for groupedbar * fix series_annotations for bar * fix fillrange of annotation series for groupedbar
This commit is contained in:
parent
7b1941b129
commit
b79a2d32fe
@ -472,16 +472,6 @@ end
|
|||||||
fillto = map(x -> _is_positive(x) ? typeof(baseline)(x) : baseline, fillto)
|
fillto = map(x -> _is_positive(x) ? typeof(baseline)(x) : baseline, fillto)
|
||||||
end
|
end
|
||||||
|
|
||||||
if !isnothing(plotattributes[:series_annotations])
|
|
||||||
if isvertical(plotattributes)
|
|
||||||
annotations := (x,y,plotattributes[:series_annotations].strs,:bottom)
|
|
||||||
else
|
|
||||||
annotations := (y,x,plotattributes[:series_annotations].strs,:left)
|
|
||||||
end
|
|
||||||
series_annotations := nothing
|
|
||||||
end
|
|
||||||
|
|
||||||
# create the bar shapes by adding x/y segments
|
|
||||||
xseg, yseg = Segments(), Segments()
|
xseg, yseg = Segments(), Segments()
|
||||||
for i = 1:ny
|
for i = 1:ny
|
||||||
yi = procy[i]
|
yi = procy[i]
|
||||||
@ -507,15 +497,30 @@ end
|
|||||||
# switch back
|
# switch back
|
||||||
if !isvertical(plotattributes)
|
if !isvertical(plotattributes)
|
||||||
xseg, yseg = yseg, xseg
|
xseg, yseg = yseg, xseg
|
||||||
|
x, y = y, x
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# reset orientation
|
# reset orientation
|
||||||
orientation := default(:orientation)
|
orientation := default(:orientation)
|
||||||
|
|
||||||
x := xseg.pts
|
# draw the bar shapes
|
||||||
y := yseg.pts
|
@series begin
|
||||||
seriestype := :shape
|
seriestype := :shape
|
||||||
|
series_annotations := nothing
|
||||||
|
primary := true
|
||||||
|
x := xseg.pts
|
||||||
|
y := yseg.pts
|
||||||
|
()
|
||||||
|
end
|
||||||
|
|
||||||
|
# add empty series
|
||||||
|
primary := false
|
||||||
|
seriestype := :scatter
|
||||||
|
markersize := 0
|
||||||
|
markeralpha := 0
|
||||||
|
fillrange := nothing
|
||||||
|
x := x
|
||||||
|
y := y
|
||||||
()
|
()
|
||||||
end
|
end
|
||||||
@deps bar shape
|
@deps bar shape
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user