Skip to content

Commit bae7efe

Browse files
committed
add docstring for RefLine
1 parent 4ae0cdc commit bae7efe

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

src/charts/refline.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
REFLINE_DEFAULT = Dict{Symbol, Any}(:values => 0, # the position of refline, it can be a vector of values
2-
:axis => nothing, # which axis should be used to draw refline, :xaxis, :x2axis, :yaxis, :y2axis
3-
:opacity=>1,
4-
:thickness=>1,
5-
:color=>"gray",
6-
:dash=>[0],
1+
"""
2+
RefLine(args...)
73
8-
:clip=>nothing
9-
)
4+
Represent a Refline with given arguments.
5+
6+
$(print_doc(REFLINE_DEFAULT))
7+
"""
108
mutable struct RefLine <: SGMarks
119
opts
1210
function RefLine(;opts...)

src/kwds.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,5 +288,16 @@ DENSITY_DEFAULT = SGKwds(
288288

289289
:legend => __dic(:default=> nothing, :__ord=>6, :__cat=>"Legend", :__doc=>Kwds_docs[:legend]),
290290

291+
:clip => __dic(:default=> nothing, :__ord=>7, :__cat=>"Miscellaneous", :__doc=>Kwds_docs[:clip]),
292+
)
293+
294+
REFLINE_DEFAULT = SGKwds(
295+
:values => __dic(:default=> 0, :__ord=>0, :__cat => "Required", :__doc=>"The position of reflines, it can be a vector of values."),
296+
:axis => __dic(:default=> nothing, :__ord=>0, :__cat => "Required", :__doc=>"WHich axis should be used to draw the reflines, i.e. `:xaxis`, `:x2axis`, `:yaxis`, `:y2axis`."),
297+
298+
:opacity => __dic(:default=> 1, :__ord=>3, :__cat=>"Refline appearance", :__doc=>Kwds_docs[:opacity]),
299+
:thickness => __dic(:default=> 1, :__ord=>3, :__cat=>"Refline appearance", :__doc=>"The line thickness."),
300+
:color => __dic(:default=> :grey, :__ord=>3, :__cat=>"Refline appearance", :__doc=>Kwds_docs[:color_grad]),
301+
:dash => __dic(:default=> [0], :__ord=>3, :__cat=>"Refline appearance", :__doc=>"The line dash style."),
291302
:clip => __dic(:default=> nothing, :__ord=>7, :__cat=>"Miscellaneous", :__doc=>Kwds_docs[:clip]),
292303
)

0 commit comments

Comments
 (0)