Skip to content

Commit e9024f6

Browse files
committed
add docstring for Line
1 parent c619b63 commit e9024f6

File tree

2 files changed

+27
-17
lines changed

2 files changed

+27
-17
lines changed

src/charts/line.jl

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
LINE_DEFAULT = Dict{Symbol, Any}(:x => 0, :y=>0, :group=>nothing,
2-
:x2axis=>false,
3-
:y2axis=>false,
4-
:opacity=>1,
5-
:thickness=>1,
6-
:dash => [0],
7-
:filled=>true,
8-
:fill=>"null",
9-
:fillcolor=> :white,
10-
:color=>"#4682b4",
11-
:interpolate => :linear,
12-
:breaks=>false, # false means remove missing values - true means create a break
13-
:legend=>nothing,
1+
"""
2+
Line(args...)
143
15-
:xshift=>0, # [0,1] it is usefull for the situation when x axis is discrete
16-
:yshift=>0,
4+
Represent a Line plot with given arguments.
175
18-
:clip=>nothing
19-
)
6+
$(print_doc(LINE_DEFAULT))
7+
"""
208
mutable struct Line <: SGMarks
219
opts
2210
function Line(;opts...)

src/kwds.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,5 +326,27 @@ POLYGON_DEFAULT = SGKwds(
326326
:y2axis => __dic(:default=> false, :__ord=>5, :__cat=>"Axes options", :__doc=>Kwds_docs[:y2axis]),
327327
:legend => __dic(:default=> nothing, :__ord=>6, :__cat=>"Legend", :__doc=>Kwds_docs[:legend]),
328328

329+
:clip => __dic(:default=> nothing, :__ord=>7, :__cat=>"Miscellaneous", :__doc=>Kwds_docs[:clip]),
330+
)
331+
332+
LINE_DEFAULT = SGKwds(
333+
:x => __dic(:default=> 0, :__ord=>0, :__cat => "Required", :__doc=>"The column to be used as x coordinate."),
334+
:y => __dic(:default=> 0, :__ord=>0, :__cat=> "Required", :__doc=>"The column to be used as y coordinate."),
335+
:group => __dic(:default=> nothing, :__ord=>2, :__cat=>"Grouping", :__doc=>"The name of column for grouping observation. Each group of observations will create seperate Line."),
336+
337+
:opacity => __dic(:default=> 1, :__ord=>3, :__cat=>"Line appearance", :__doc=>Kwds_docs[:opacity]),
338+
:thickness => __dic(:default=> 1, :__ord=>3, :__cat=>"Line appearance", :__doc=>"The Line thickness."),
339+
:dash => __dic(:default=> [0], :__ord=>3, :__cat=>"Line appearance", :__doc=>"The Line dash style."),
340+
:color => __dic(:default=> "#4682b4", :__ord=>3, :__cat=>"Line appearance", :__doc=>Kwds_docs[:color_grad]),
341+
342+
:interpolate => __dic(:default=>:linear, :__ord=>1, :__cat=>"Line Options", :__doc=>Kwds_docs[:interpolate]),
343+
:breaks => __dic(:default=>false, :__ord=>1, :__cat=>"Line Options", :__doc=>Kwds_docs[:breaks]),
344+
345+
:x2axis => __dic(:default=> false, :__ord=>5, :__cat=>"Axes options", :__doc=>Kwds_docs[:x2axis]),
346+
:y2axis => __dic(:default=> false, :__ord=>5, :__cat=>"Axes options", :__doc=>Kwds_docs[:y2axis]),
347+
:xshift => __dic(:default=> 0, :__ord=>5, :__cat=>"Axes options", :__doc=>"Shift the mark in direction of x. Useful for discrete type axes."),
348+
:yshift => __dic(:default=> 0, :__ord=>5, :__cat=>"Axes options", :__doc=>"Shift the mark in direction of y. Useful for discrete type axes."),
349+
:legend => __dic(:default=> nothing, :__ord=>6, :__cat=>"Legend", :__doc=>Kwds_docs[:legend]),
350+
329351
:clip => __dic(:default=> nothing, :__ord=>7, :__cat=>"Miscellaneous", :__doc=>Kwds_docs[:clip]),
330352
)

0 commit comments

Comments
 (0)