From 8b5164163c705e55ae10704c88534fc2ce50c407 Mon Sep 17 00:00:00 2001
From: Randy Morgan
- lib/axlsx.rb,
lib/axlsx/drawing/axis.rb,
lib/axlsx/drawing/chart.rb,
lib/axlsx/stylesheet/xf.rb,
lib/axlsx/doc_props/app.rb,
lib/axlsx/drawing/title.rb,
lib/axlsx/util/constants.rb,
lib/axlsx/doc_props/core.rb,
lib/axlsx/drawing/marker.rb,
lib/axlsx/drawing/series.rb,
lib/axlsx/drawing/view_3D.rb,
lib/axlsx/util/validators.rb,
lib/axlsx/stylesheet/font.rb,
lib/axlsx/stylesheet/fill.rb,
lib/axlsx/drawing/scaling.rb,
lib/axlsx/drawing/drawing.rb,
lib/axlsx/drawing/cat_axis.rb,
lib/axlsx/stylesheet/color.rb,
lib/axlsx/drawing/val_axis.rb,
lib/axlsx/stylesheet/styles.rb,
lib/axlsx/workbook/workbook.rb,
lib/axlsx/rels/relationship.rb,
lib/axlsx/stylesheet/border.rb,
lib/axlsx/rels/relationships.rb,
lib/axlsx/drawing/bar_series.rb,
lib/axlsx/drawing/pie_series.rb,
lib/axlsx/stylesheet/num_fmt.rb,
lib/axlsx/drawing/bar_3D_chart.rb,
lib/axlsx/stylesheet/border_pr.rb,
lib/axlsx/content_type/default.rb,
lib/axlsx/drawing/pie_3D_chart.rb,
lib/axlsx/content_type/override.rb,
lib/axlsx/stylesheet/cell_style.rb,
lib/axlsx/drawing/graphic_frame.rb,
lib/axlsx/util/simple_typed_list.rb,
lib/axlsx/workbook/worksheet/row.rb,
lib/axlsx/stylesheet/table_style.rb,
lib/axlsx/stylesheet/pattern_fill.rb,
lib/axlsx/stylesheet/table_styles.rb,
lib/axlsx/workbook/worksheet/cell.rb,
lib/axlsx/drawing/two_cell_anchor.rb,
lib/axlsx/stylesheet/gradient_stop.rb,
lib/axlsx/stylesheet/gradient_fill.rb,
lib/axlsx/stylesheet/cell_alignment.rb,
lib/axlsx/content_type/content_type.rb,
lib/axlsx/stylesheet/cell_protection.rb,
lib/axlsx/workbook/worksheet/worksheet.rb,
lib/axlsx/stylesheet/table_style_element.rb
+ lib/axlsx.rb,
lib/axlsx/drawing/axis.rb,
lib/axlsx/drawing/chart.rb,
lib/axlsx/stylesheet/xf.rb,
lib/axlsx/doc_props/app.rb,
lib/axlsx/drawing/title.rb,
lib/axlsx/util/constants.rb,
lib/axlsx/doc_props/core.rb,
lib/axlsx/drawing/marker.rb,
lib/axlsx/drawing/series.rb,
lib/axlsx/drawing/drawing.rb,
lib/axlsx/drawing/scaling.rb,
lib/axlsx/stylesheet/fill.rb,
lib/axlsx/util/validators.rb,
lib/axlsx/drawing/view_3D.rb,
lib/axlsx/stylesheet/font.rb,
lib/axlsx/drawing/val_axis.rb,
lib/axlsx/drawing/ser_axis.rb,
lib/axlsx/stylesheet/color.rb,
lib/axlsx/drawing/cat_axis.rb,
lib/axlsx/stylesheet/styles.rb,
lib/axlsx/workbook/workbook.rb,
lib/axlsx/stylesheet/border.rb,
lib/axlsx/rels/relationship.rb,
lib/axlsx/drawing/bar_series.rb,
lib/axlsx/stylesheet/num_fmt.rb,
lib/axlsx/drawing/pie_series.rb,
lib/axlsx/rels/relationships.rb,
lib/axlsx/drawing/line_series.rb,
lib/axlsx/stylesheet/border_pr.rb,
lib/axlsx/content_type/default.rb,
lib/axlsx/drawing/series_title.rb,
lib/axlsx/drawing/pie_3D_chart.rb,
lib/axlsx/drawing/bar_3D_chart.rb,
lib/axlsx/stylesheet/cell_style.rb,
lib/axlsx/drawing/graphic_frame.rb,
lib/axlsx/content_type/override.rb,
lib/axlsx/drawing/line_3D_chart.rb,
lib/axlsx/util/simple_typed_list.rb,
lib/axlsx/workbook/worksheet/row.rb,
lib/axlsx/stylesheet/table_style.rb,
lib/axlsx/workbook/worksheet/cell.rb,
lib/axlsx/stylesheet/table_styles.rb,
lib/axlsx/drawing/two_cell_anchor.rb,
lib/axlsx/stylesheet/pattern_fill.rb,
lib/axlsx/stylesheet/gradient_fill.rb,
lib/axlsx/stylesheet/gradient_stop.rb,
lib/axlsx/content_type/content_type.rb,
lib/axlsx/stylesheet/cell_alignment.rb,
lib/axlsx/stylesheet/cell_protection.rb,
lib/axlsx/workbook/worksheet/worksheet.rb,
lib/axlsx/stylesheet/table_style_element.rb
end_at, graphic_frame, index, pn, series, series_type, show_legend, start_at, title, view3D
+end_at, graphic_frame, index, pn, series, series_type, show_legend, start_at, style, title, view3D
@@ -624,8 +624,6 @@ a customizable set of options# File 'lib/axlsx/drawing/bar_3D_chart.rb', line 79 def initialize(frame, ={}) - super(frame, ) - @series_type = BarSeries = :bar @grouping = :clustered @catAxId = rand(8 ** 8) @@ -633,6 +631,8 @@ a customizable set of options @catAxis = CatAxis.new(@catAxId, @valAxId) @valAxis = ValAxis.new(@valAxId, @catAxId) @view3D = View3D.new(:rAngAx=>1) + super(frame, ) + @series_type = BarSeries end@@ -1144,7 +1144,7 @@ Serializes the bar chart diff --git a/doc/Axlsx/BarSeries.html b/doc/Axlsx/BarSeries.html index 5384a077..02884b20 100644 --- a/doc/Axlsx/BarSeries.html +++ b/doc/Axlsx/BarSeries.html @@ -702,7 +702,8 @@ The document builder instance this objects xml will be added to. 74 75 76 -77 +77 +78
# File 'lib/axlsx/drawing/bar_series.rb', line 43 @@ -740,6 +741,7 @@ The document builder instance this objects xml will be added to. } } } + xml.send('c:shape', :val=>@shape) end end@@ -753,7 +755,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Border.html b/doc/Axlsx/Border.html index 24d11058..e52f64e7 100644 --- a/doc/Axlsx/Border.html +++ b/doc/Axlsx/Border.html @@ -766,7 +766,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/BorderPr.html b/doc/Axlsx/BorderPr.html index f9a93ed0..4a8fe417 100644 --- a/doc/Axlsx/BorderPr.html +++ b/doc/Axlsx/BorderPr.html @@ -700,7 +700,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/CatAxis.html b/doc/Axlsx/CatAxis.html index 891168a1..7c2ccee8 100644 --- a/doc/Axlsx/CatAxis.html +++ b/doc/Axlsx/CatAxis.html @@ -757,7 +757,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Cell.html b/doc/Axlsx/Cell.html index 9f90513f..163b909a 100644 --- a/doc/Axlsx/Cell.html +++ b/doc/Axlsx/Cell.html @@ -1614,7 +1614,7 @@ xml text for the cell diff --git a/doc/Axlsx/CellAlignment.html b/doc/Axlsx/CellAlignment.html index 07651c06..9b5fcf4e 100644 --- a/doc/Axlsx/CellAlignment.html +++ b/doc/Axlsx/CellAlignment.html @@ -1238,7 +1238,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/CellProtection.html b/doc/Axlsx/CellProtection.html index 9f0d06d6..65fcf78f 100644 --- a/doc/Axlsx/CellProtection.html +++ b/doc/Axlsx/CellProtection.html @@ -556,7 +556,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/CellStyle.html b/doc/Axlsx/CellStyle.html index f3dfc76b..7bcc7bfa 100644 --- a/doc/Axlsx/CellStyle.html +++ b/doc/Axlsx/CellStyle.html @@ -940,7 +940,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Chart.html b/doc/Axlsx/Chart.html index d60170e6..af6c0596 100644 --- a/doc/Axlsx/Chart.html +++ b/doc/Axlsx/Chart.html @@ -116,7 +116,7 @@ A Chart is the superclass for specific charts @@ -336,6 +336,33 @@ The starting marker for this chart. + + + +
+The style for the chart. +
+-52 -53 -54 -55 -56 -57 58 59 60 61 -62+62 +63 +64 +65 +66 +67 +68 +69
# File 'lib/axlsx/drawing/chart.rb', line 52 +# File 'lib/axlsx/drawing/chart.rb', line 58 def initialize(frame, ={}) + @style = 2 @graphic_frame=frame @graphic_frame.anchor.drawing.worksheet.workbook.charts << self @series = SimpleTypedList.new Series @@ -692,12 +721,12 @@ The ending marker for this chart-42 -43 -44+48 +49 +50
# File 'lib/axlsx/drawing/chart.rb', line 42 +# File 'lib/axlsx/drawing/chart.rb', line 48 def end_at @end_at @@ -749,12 +778,12 @@ A reference to the graphic frame that owns this chart-15 -16 -17+21 +22 +23
# File 'lib/axlsx/drawing/chart.rb', line 15 +# File 'lib/axlsx/drawing/chart.rb', line 21 def graphic_frame @graphic_frame @@ -806,12 +835,12 @@ The index of this chart in the workbooks charts collection-27 -28 -29+33 +34 +35
# File 'lib/axlsx/drawing/chart.rb', line 27 +# File 'lib/axlsx/drawing/chart.rb', line 33 def index @graphic_frame.anchor.drawing.worksheet.workbook.charts.index(self) @@ -863,12 +892,12 @@ The part name for this chart-31 -32 -33+37 +38 +39
# File 'lib/axlsx/drawing/chart.rb', line 31 +# File 'lib/axlsx/drawing/chart.rb', line 37 def pn "#{CHART_PN % (index+1)}" @@ -920,12 +949,12 @@ A collection of series objects that are applied to the chart-19 -20 -21+25 +26 +27
# File 'lib/axlsx/drawing/chart.rb', line 19 +# File 'lib/axlsx/drawing/chart.rb', line 25 def series @series @@ -977,12 +1006,12 @@ The type of series to use for this chart-23 -24 -25+29 +30 +31
# File 'lib/axlsx/drawing/chart.rb', line 23 +# File 'lib/axlsx/drawing/chart.rb', line 29 def series_type @series_type @@ -1034,12 +1063,12 @@ Show the legend in the chart-46 -47 -48+52 +53 +54
# File 'lib/axlsx/drawing/chart.rb', line 46 +# File 'lib/axlsx/drawing/chart.rb', line 52 def show_legend @show_legend @@ -1091,12 +1120,12 @@ The starting marker for this chart-38 -39 -40+44 +45 +46
# File 'lib/axlsx/drawing/chart.rb', line 38 +# File 'lib/axlsx/drawing/chart.rb', line 44 def start_at @start_at @@ -1108,6 +1137,63 @@ The starting marker for this chart + + +++ ++ + - (Integer) style + + + +
+++++The style for the chart. see ECMA Part 1 ยง21.2.2.196 +
+ + ++
++ ++ ++ + +14 +15 +16++ +# File 'lib/axlsx/drawing/chart.rb', line 14 + +def style + @style +end ++@@ -1148,12 +1234,12 @@ The title object for the chart.-8 9 -10+10 +11
# File 'lib/axlsx/drawing/chart.rb', line 8 +# File 'lib/axlsx/drawing/chart.rb', line 9 def title @title @@ -1192,12 +1278,12 @@ The 3D view properties for the chart-11 -12 -13+17 +18 +19
# File 'lib/axlsx/drawing/chart.rb', line 11 +# File 'lib/axlsx/drawing/chart.rb', line 17 def view3D @view3D @@ -1260,13 +1346,13 @@ Adds a new series to the chart’s series collection.-85 -86 -87 -88+94 +95 +96 +97
# File 'lib/axlsx/drawing/chart.rb', line 85 +# File 'lib/axlsx/drawing/chart.rb', line 94 def add_series(={}) @series_type.new(self, ) @@ -1303,15 +1389,6 @@ Chart Serialization serializes the chart-92 -93 -94 -95 -96 -97 -98 -99 -100 101 102 103 @@ -1323,14 +1400,27 @@ Chart Serialization serializes the chart 109 110 111 -112+112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123
# File 'lib/axlsx/drawing/chart.rb', line 92 +# File 'lib/axlsx/drawing/chart.rb', line 101 def to_xml builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| xml.send('c:chartSpace',:'xmlns:c' => XML_NS_C, :'xmlns:a' => XML_NS_A) { + xml.send('c:date1904', :val=>Axlsx::Workbook.date1904) + xml.send('c:style', :val=>style) xml.send('c:chart') { @title.to_xml(xml) unless @title.nil? @view3D.to_xml(xml) unless @view3D.nil? @@ -1360,7 +1450,7 @@ Chart Serialization serializes the chart diff --git a/doc/Axlsx/Color.html b/doc/Axlsx/Color.html index 9a5fdbc8..5cfc7ac6 100644 --- a/doc/Axlsx/Color.html +++ b/doc/Axlsx/Color.html @@ -656,7 +656,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/ContentType.html b/doc/Axlsx/ContentType.html index 72b5f52c..a60a275b 100644 --- a/doc/Axlsx/ContentType.html +++ b/doc/Axlsx/ContentType.html @@ -331,7 +331,7 @@ The document as a string. diff --git a/doc/Axlsx/Core.html b/doc/Axlsx/Core.html index 2b9f51f4..19f5431b 100644 --- a/doc/Axlsx/Core.html +++ b/doc/Axlsx/Core.html @@ -456,7 +456,7 @@ time when this method is called. diff --git a/doc/Axlsx/DataTypeValidator.html b/doc/Axlsx/DataTypeValidator.html index 31b3bb99..15afbfc9 100644 --- a/doc/Axlsx/DataTypeValidator.html +++ b/doc/Axlsx/DataTypeValidator.html @@ -315,7 +315,7 @@ types or the block passed returns false diff --git a/doc/Axlsx/Default.html b/doc/Axlsx/Default.html index 961e096e..9c005b15 100644 --- a/doc/Axlsx/Default.html +++ b/doc/Axlsx/Default.html @@ -566,7 +566,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Drawing.html b/doc/Axlsx/Drawing.html index e6f1fb51..fffef370 100644 --- a/doc/Axlsx/Drawing.html +++ b/doc/Axlsx/Drawing.html @@ -487,15 +487,15 @@ The worksheet that owns this drawing-63 -64 -65 -66 67 -68+68 +69 +70 +71 +72
# File 'lib/axlsx/drawing/drawing.rb', line 63 +# File 'lib/axlsx/drawing/drawing.rb', line 67 def initialize(worksheet) DataTypeValidator.validate "Drawing.worksheet", Worksheet, worksheet @@ -555,12 +555,12 @@ A collection of anchors for this drawing-35 -36 -37+39 +40 +41
# File 'lib/axlsx/drawing/drawing.rb', line 35 +# File 'lib/axlsx/drawing/drawing.rb', line 39 def anchors @anchors @@ -612,12 +612,12 @@ An array of charts that are associated with this drawing’s anchors-39 -40 -41+43 +44 +45
# File 'lib/axlsx/drawing/drawing.rb', line 39 +# File 'lib/axlsx/drawing/drawing.rb', line 43 def charts @anchors.map { |a| a.graphic_frame.chart } @@ -670,12 +670,12 @@ collection.-43 -44 -45+47 +48 +49
# File 'lib/axlsx/drawing/drawing.rb', line 43 +# File 'lib/axlsx/drawing/drawing.rb', line 47 def index @worksheet.workbook.drawings.index(self) @@ -727,12 +727,12 @@ The part name for this drawing-51 -52 -53+55 +56 +57
# File 'lib/axlsx/drawing/drawing.rb', line 51 +# File 'lib/axlsx/drawing/drawing.rb', line 55 def pn "#{DRAWING_PN % (index+1)}" @@ -784,17 +784,17 @@ The drawing’s relationships.-59 -60 -61 -62 63 64 65 -66+66 +67 +68 +69 +70
# File 'lib/axlsx/drawing/drawing.rb', line 59 +# File 'lib/axlsx/drawing/drawing.rb', line 63 def relationships r = Relationships.new @@ -851,12 +851,12 @@ The relational part name for this drawing-55 -56 -57+59 +60 +61
# File 'lib/axlsx/drawing/drawing.rb', line 55 +# File 'lib/axlsx/drawing/drawing.rb', line 59 def rels_pn "#{DRAWING_RELS_PN % (index+1)}" @@ -908,12 +908,12 @@ The relation reference id for this drawing-47 -48 -49+51 +52 +53
# File 'lib/axlsx/drawing/drawing.rb', line 47 +# File 'lib/axlsx/drawing/drawing.rb', line 51 def rId "rId#{index+1}" @@ -965,12 +965,12 @@ The worksheet that owns the drawing-30 -31 -32+34 +35 +36
# File 'lib/axlsx/drawing/drawing.rb', line 30 +# File 'lib/axlsx/drawing/drawing.rb', line 34 def worksheet @worksheet @@ -1056,14 +1056,14 @@ The class of the chart to be added to the drawing-75 -76 -77 -78 -79+79 +80 +81 +82 +83
# File 'lib/axlsx/drawing/drawing.rb', line 75 +# File 'lib/axlsx/drawing/drawing.rb', line 79 def add_chart(chart_type, ={}) DataTypeValidator.validate "Drawing.chart_type", Chart, chart_type @@ -1114,17 +1114,17 @@ Serializes the drawing-112 -113 -114 -115 116 117 118 -119+119 +120 +121 +122 +123
# File 'lib/axlsx/drawing/drawing.rb', line 112 +# File 'lib/axlsx/drawing/drawing.rb', line 116 def to_xml builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| @@ -1145,7 +1145,7 @@ Serializes the drawing diff --git a/doc/Axlsx/Fill.html b/doc/Axlsx/Fill.html index 65103017..c2a1d64c 100644 --- a/doc/Axlsx/Fill.html +++ b/doc/Axlsx/Fill.html @@ -451,7 +451,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Font.html b/doc/Axlsx/Font.html index 8e829ac3..ada7b676 100644 --- a/doc/Axlsx/Font.html +++ b/doc/Axlsx/Font.html @@ -1545,7 +1545,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/GradientFill.html b/doc/Axlsx/GradientFill.html index bfc9407a..3c37b50c 100644 --- a/doc/Axlsx/GradientFill.html +++ b/doc/Axlsx/GradientFill.html @@ -1017,7 +1017,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/GradientStop.html b/doc/Axlsx/GradientStop.html index 51727c98..f5f8ece1 100644 --- a/doc/Axlsx/GradientStop.html +++ b/doc/Axlsx/GradientStop.html @@ -517,7 +517,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/GraphicFrame.html b/doc/Axlsx/GraphicFrame.html index 6c259d82..ce46db59 100644 --- a/doc/Axlsx/GraphicFrame.html +++ b/doc/Axlsx/GraphicFrame.html @@ -637,7 +637,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Marker.html b/doc/Axlsx/Marker.html index b7212a79..68315516 100644 --- a/doc/Axlsx/Marker.html +++ b/doc/Axlsx/Marker.html @@ -848,7 +848,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/NumFmt.html b/doc/Axlsx/NumFmt.html index afe2086f..0a4b42f2 100644 --- a/doc/Axlsx/NumFmt.html +++ b/doc/Axlsx/NumFmt.html @@ -553,7 +553,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Override.html b/doc/Axlsx/Override.html index 23d29842..a1935495 100644 --- a/doc/Axlsx/Override.html +++ b/doc/Axlsx/Override.html @@ -559,7 +559,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Package.html b/doc/Axlsx/Package.html index a9007719..87bd8c22 100644 --- a/doc/Axlsx/Package.html +++ b/doc/Axlsx/Package.html @@ -1284,7 +1284,7 @@ An array of all validation errors encountered. diff --git a/doc/Axlsx/PatternFill.html b/doc/Axlsx/PatternFill.html index 3dcc6dd9..6772f0c7 100644 --- a/doc/Axlsx/PatternFill.html +++ b/doc/Axlsx/PatternFill.html @@ -672,7 +672,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Pie3DChart.html b/doc/Axlsx/Pie3DChart.html index ec7187c3..ef2ab02c 100644 --- a/doc/Axlsx/Pie3DChart.html +++ b/doc/Axlsx/Pie3DChart.html @@ -170,7 +170,7 @@ Creating a chartInstance Attribute Summary
Attributes inherited from Chart
-end_at, graphic_frame, index, pn, series, series_type, show_legend, start_at, title, view3D
+end_at, graphic_frame, index, pn, series, series_type, show_legend, start_at, style, title, view3D
@@ -343,8 +343,8 @@ a customizable set of options# File 'lib/axlsx/drawing/pie_3D_chart.rb', line 41 def initialize(workbook, ={}) - super(workbook, ) # this charts series type + super(workbook, ) @series_type = PieSeries @view3D = View3D.new(:rotX => 30, :perspective => 30) end @@ -430,7 +430,7 @@ Serializes the pie chart diff --git a/doc/Axlsx/PieSeries.html b/doc/Axlsx/PieSeries.html index aa9adfee..75789976 100644 --- a/doc/Axlsx/PieSeries.html +++ b/doc/Axlsx/PieSeries.html @@ -753,7 +753,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/RegexValidator.html b/doc/Axlsx/RegexValidator.html index 3d0b4c97..b1d029a6 100644 --- a/doc/Axlsx/RegexValidator.html +++ b/doc/Axlsx/RegexValidator.html @@ -259,7 +259,7 @@ The value to validate. diff --git a/doc/Axlsx/Relationship.html b/doc/Axlsx/Relationship.html index 16e1e3e6..52eef338 100644 --- a/doc/Axlsx/Relationship.html +++ b/doc/Axlsx/Relationship.html @@ -545,7 +545,7 @@ the reference id of the object. diff --git a/doc/Axlsx/Relationships.html b/doc/Axlsx/Relationships.html index e7b973ef..e98e2e3c 100644 --- a/doc/Axlsx/Relationships.html +++ b/doc/Axlsx/Relationships.html @@ -334,7 +334,7 @@ Serializes the relationships document. diff --git a/doc/Axlsx/RestrictionValidator.html b/doc/Axlsx/RestrictionValidator.html index a6441a7d..1935862d 100644 --- a/doc/Axlsx/RestrictionValidator.html +++ b/doc/Axlsx/RestrictionValidator.html @@ -291,7 +291,7 @@ Raised if the value provided is not in the list of choices. diff --git a/doc/Axlsx/Row.html b/doc/Axlsx/Row.html index d7e6d669..c840fd06 100644 --- a/doc/Axlsx/Row.html +++ b/doc/Axlsx/Row.html @@ -762,7 +762,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Scaling.html b/doc/Axlsx/Scaling.html index a2a24dbf..4d201069 100644 --- a/doc/Axlsx/Scaling.html +++ b/doc/Axlsx/Scaling.html @@ -731,7 +731,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Series.html b/doc/Axlsx/Series.html index 5da758f4..2c488521 100644 --- a/doc/Axlsx/Series.html +++ b/doc/Axlsx/Series.html @@ -124,7 +124,7 @@ A Series defines the title, data and labels for chart data. @@ -215,7 +215,7 @@ The order of this series in the chart’s series.
- - (String) title + - (SeriesTitle) title @@ -610,7 +610,7 @@ The title of the series
-57 -58 -59 -60 61 62 63 64 65 -66+66 +67 +68
# File 'lib/axlsx/drawing/series.rb', line 57 +# File 'lib/axlsx/drawing/series.rb', line 61 def to_xml(xml) xml.send('c:ser') { xml.send('c:idx', :val=>index) - xml.send('c:order', :val=>order || index) - xml.send('c:tx') { - xml.send('c:v', self.title) - } + xml.send('c:order', :val=>order || index) + title.to_xml(xml) unless title.nil? yield xml if block_given? } end @@ -741,7 +737,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/SimpleTypedList.html b/doc/Axlsx/SimpleTypedList.html index bc3e4b5f..70e588f5 100644 --- a/doc/Axlsx/SimpleTypedList.html +++ b/doc/Axlsx/SimpleTypedList.html @@ -1608,7 +1608,7 @@ Unlock the list diff --git a/doc/Axlsx/Styles.html b/doc/Axlsx/Styles.html index 0fca6383..a91a665c 100644 --- a/doc/Axlsx/Styles.html +++ b/doc/Axlsx/Styles.html @@ -1745,7 +1745,7 @@ Serializes the styles document diff --git a/doc/Axlsx/TableStyle.html b/doc/Axlsx/TableStyle.html index c8f1f93c..f78aec2c 100644 --- a/doc/Axlsx/TableStyle.html +++ b/doc/Axlsx/TableStyle.html @@ -701,7 +701,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/TableStyleElement.html b/doc/Axlsx/TableStyleElement.html index 885d8e15..618bcdaf 100644 --- a/doc/Axlsx/TableStyleElement.html +++ b/doc/Axlsx/TableStyleElement.html @@ -668,7 +668,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/TableStyles.html b/doc/Axlsx/TableStyles.html index fdb60660..6967532e 100644 --- a/doc/Axlsx/TableStyles.html +++ b/doc/Axlsx/TableStyles.html @@ -590,7 +590,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Title.html b/doc/Axlsx/Title.html index c55d9b51..625f1dc6 100644 --- a/doc/Axlsx/Title.html +++ b/doc/Axlsx/Title.html @@ -104,8 +104,12 @@ A Title stores information about the title of a chart++Direct Known Subclasses
+Instance Attribute Summary (collapse)
+62 63 64 -65 -66+65
# File 'lib/axlsx/drawing/title.rb', line 63 +# File 'lib/axlsx/drawing/title.rb', line 62 def range return "" unless @data.is_a?(Cell) @@ -567,6 +571,7 @@ The document builder instance this objects xml will be added to.+42 43 44 45 @@ -580,11 +585,10 @@ The document builder instance this objects xml will be added to. 53 54 55 -56 -57+56
# File 'lib/axlsx/drawing/title.rb', line 43 +# File 'lib/axlsx/drawing/title.rb', line 42 def to_xml(xml) xml.send('c:title') { @@ -612,7 +616,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/TwoCellAnchor.html b/doc/Axlsx/TwoCellAnchor.html index b5ef9a71..0f235871 100644 --- a/doc/Axlsx/TwoCellAnchor.html +++ b/doc/Axlsx/TwoCellAnchor.html @@ -1106,7 +1106,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/ValAxis.html b/doc/Axlsx/ValAxis.html index a1433dc5..c7e968b6 100644 --- a/doc/Axlsx/ValAxis.html +++ b/doc/Axlsx/ValAxis.html @@ -530,7 +530,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/View3D.html b/doc/Axlsx/View3D.html index 31d98713..39dee6f8 100644 --- a/doc/Axlsx/View3D.html +++ b/doc/Axlsx/View3D.html @@ -962,7 +962,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/Axlsx/Workbook.html b/doc/Axlsx/Workbook.html index adbeafcb..de654131 100644 --- a/doc/Axlsx/Workbook.html +++ b/doc/Axlsx/Workbook.html @@ -1338,7 +1338,7 @@ Serializes the workbook document diff --git a/doc/Axlsx/Worksheet.html b/doc/Axlsx/Worksheet.html index 881561d0..e00f3633 100644 --- a/doc/Axlsx/Worksheet.html +++ b/doc/Axlsx/Worksheet.html @@ -1855,7 +1855,7 @@ of Cell objects diff --git a/doc/Axlsx/Xf.html b/doc/Axlsx/Xf.html index b8462333..67fd183b 100644 --- a/doc/Axlsx/Xf.html +++ b/doc/Axlsx/Xf.html @@ -1672,7 +1672,7 @@ The document builder instance this objects xml will be added to. diff --git a/doc/_index.html b/doc/_index.html index 8249c785..787429f1 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -290,12 +290,19 @@ -
p = Axlsx::Package.new + p.workbook.add_worksheet do |sheet| + sheet.add_row ["First", 1, 5, 7, 9] + sheet.add_row ["Second", 5, 2, 14, 9] + sheet.add_chart(Axlsx::Line3DChart, :start_at => [0,2], :end_at => [10, 15], :title=>"example 6: Line Chart") do |chart| + chart.add_series :data=>sheet.rows.first.cells[(1..-1)], :title=> sheet.rows.first.cells.first + chart.add_series :data=>sheet.rows.last.cells[(1..-1)], :title=> sheet.rows.last.cells.first + end + end + p.serialize("example6.xlsx") ++
This gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:
@@ -191,21 +205,36 @@ It enables the you to generate 100% valid xlsx files that include customised styAxlsx © 2011 by Randy Morgan. Axlsx is licensed under the MIT license. Please see the LICENSE document for more information.
diff --git a/doc/index.html b/doc/index.html index 10377a44..56188a47 100644 --- a/doc/index.html +++ b/doc/index.html @@ -61,8 +61,8 @@ Author: Randy Morgan Copyright: 2011p = Axlsx::Package.new + p.workbook.add_worksheet do |sheet| + sheet.add_row ["First", 1, 5, 7, 9] + sheet.add_row ["Second", 5, 2, 14, 9] + sheet.add_chart(Axlsx::Line3DChart, :start_at => [0,2], :end_at => [10, 15], :title=>"example 6: Line Chart") do |chart| + chart.add_series :data=>sheet.rows.first.cells[(1..-1)], :title=> sheet.rows.first.cells.first + chart.add_series :data=>sheet.rows.last.cells[(1..-1)], :title=> sheet.rows.last.cells.first + end + end + p.serialize("example6.xlsx") ++
This gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:
@@ -191,21 +205,36 @@ It enables the you to generate 100% valid xlsx files that include customised styAxlsx © 2011 by Randy Morgan. Axlsx is licensed under the MIT license. Please see the LICENSE document for more information.
diff --git a/doc/method_list.html b/doc/method_list.html index aede7025..2359d50a 100644 --- a/doc/method_list.html +++ b/doc/method_list.html @@ -553,6 +553,14 @@