Class: Axlsx::Line3DChart
- Inherits:
-
Chart
- Object
- Chart
- Axlsx::Line3DChart
- Defined in:
- lib/axlsx/drawing/line_3D_chart.rb
Overview
The Line3DChart is a three dimentional line chart (who would have guessed?) that you can add to your worksheet.
Constant Summary
- GAP_AMOUNT_PERCENT =
validation regex for gap amount percent
/0*(([0-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
Instance Attribute Summary (collapse)
-
- (CatAxis) catAxis
readonly
the category axis.
-
- (String) gapDepth
space between bar or column clusters, as a percentage of the bar or column width.
-
- (Symbol) grouping
grouping for a column, line, or area chart.
-
- (Axis) serAxis
readonly
the category axis.
-
- (ValAxis) valAxis
readonly
the category axis.
Attributes inherited from Chart
graphic_frame, index, pn, series, series_type, show_legend, style, title, view3D
Instance Method Summary (collapse)
-
- (Line3DChart) initialize(frame, options = {})
constructor
Creates a new line chart object.
-
- (String) to_xml
Serializes the bar chart.
Methods inherited from Chart
#add_series, #end_at, #from, #start_at, #to
Constructor Details
- (Line3DChart) initialize(frame, options = {})
Creates a new line chart object
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 61 def initialize(frame, ={}) @grouping = :standard @catAxId = rand(8 ** 8) @valAxId = rand(8 ** 8) @serAxId = rand(8 ** 8) @catAxis = CatAxis.new(@catAxId, @valAxId) @valAxis = ValAxis.new(@valAxId, @catAxId) @serAxis = SerAxis.new(@serAxId, @valAxId) super(frame, ) @series_type = LineSeries @view3D = View3D.new({:perspective=>30}.merge()) end |
Instance Attribute Details
- (CatAxis) catAxis (readonly)
the category axis
25 26 27 |
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 25 def catAxis @catAxis end |
- (String) gapDepth
space between bar or column clusters, as a percentage of the bar or column width.
37 38 39 |
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 37 def gapDepth @gapDepth end |
- (Symbol) grouping
grouping for a column, line, or area chart. must be one of [:percentStacked, :clustered, :standard, :stacked]
42 43 44 |
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 42 def grouping @grouping end |
- (Axis) serAxis (readonly)
the category axis
33 34 35 |
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 33 def serAxis @serAxis end |
- (ValAxis) valAxis (readonly)
the category axis
29 30 31 |
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 29 def valAxis @valAxis end |
Instance Method Details
- (String) to_xml
Serializes the bar chart
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 86 def to_xml super() do |xml| xml.send('c:line3DChart') { xml.send('c:grouping', :val=>grouping) xml.send('c:varyColors', :val=>1) @series.each { |ser| ser.to_xml(xml) } xml.send('c:gapDepth', :val=>@gapDepth) unless @gapDepth.nil? xml.send('c:axId', :val=>@catAxId) xml.send('c:axId', :val=>@valAxId) xml.send('c:axId', :val=>@serAxId) } @catAxis.to_xml(xml) @valAxis.to_xml(xml) @serAxis.to_xml(xml) end end |