2017-09-03 16:47:46 -05:00
|
|
|
//
|
2020-08-23 14:15:53 +00:00
|
|
|
// Copyright 2020 FoxyUtils ehf. All rights reserved.
|
|
|
|
//
|
|
|
|
// This is a commercial product and requires a license to operate.
|
|
|
|
// A trial license can be obtained at https://unidoc.io
|
|
|
|
//
|
|
|
|
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by the UniDoc End User License Agreement
|
|
|
|
// terms that can be accessed at https://unidoc.io/eula/
|
2017-09-03 16:47:46 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
package chart ;import (_cdb "fmt";_acb "github.com/unidoc/unioffice";_gcd "github.com/unidoc/unioffice/color";_ba "github.com/unidoc/unioffice/drawing";_cdg "github.com/unidoc/unioffice/measurement";_dge "github.com/unidoc/unioffice/schema/soo/dml";_bbdc "github.com/unidoc/unioffice/schema/soo/dml/chart";_gda "math/rand";);type Title struct{_dcb *_bbdc .CT_Title };
|
2017-09-03 16:47:46 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddSeries adds a default series to a line chart.
|
|
|
|
func (_fcda Line3DChart )AddSeries ()LineChartSeries {_eca :=_fcda .nextColor (len (_fcda ._eeb .Ser ));_bae :=_bbdc .NewCT_LineSer ();_fcda ._eeb .Ser =append (_fcda ._eeb .Ser ,_bae );_bae .Idx .ValAttr =uint32 (len (_fcda ._eeb .Ser )-1);_bae .Order .ValAttr =uint32 (len (_fcda ._eeb .Ser )-1);_fec :=LineChartSeries {_bae };_fec .InitializeDefaults ();_fec .Properties ().LineProperties ().SetSolidFill (_eca );_fec .Properties ().SetSolidFill (_eca );return _fec ;};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// Properties returns the Bubble chart series shape properties.
|
|
|
|
func (_cca BubbleChartSeries )Properties ()_ba .ShapeProperties {if _cca ._dfa .SpPr ==nil {_cca ._dfa .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_cca ._dfa .SpPr );};func MakeSeriesAxis (x *_bbdc .CT_SerAx )SeriesAxis {return SeriesAxis {x }};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddSeries adds a default series to an Pie chart.
|
|
|
|
func (_ebb PieOfPieChart )AddSeries ()PieChartSeries {_bace :=_bbdc .NewCT_PieSer ();_ebb ._bda .Ser =append (_ebb ._bda .Ser ,_bace );_bace .Idx .ValAttr =uint32 (len (_ebb ._bda .Ser )-1);_bace .Order .ValAttr =uint32 (len (_ebb ._bda .Ser )-1);_bcbd :=PieChartSeries {_bace };_bcbd .InitializeDefaults ();return _bcbd ;};func (_fbff BarChart )AddAxis (axis Axis ){_cdfd :=_bbdc .NewCT_UnsignedInt ();_cdfd .ValAttr =axis .AxisID ();_fbff ._aedb .AxId =append (_fbff ._aedb .AxId ,_cdfd );};func (_edef DataLabels )SetShowPercent (b bool ){_edef .ensureChoice ();_edef ._eab .Choice .ShowPercent =_bbdc .NewCT_Boolean ();_edef ._eab .Choice .ShowPercent .ValAttr =_acb .Bool (b );};func (_fea DataLabels )SetShowLegendKey (b bool ){_fea .ensureChoice ();_fea ._eab .Choice .ShowLegendKey =_bbdc .NewCT_Boolean ();_fea ._eab .Choice .ShowLegendKey .ValAttr =_acb .Bool (b );};
|
2017-09-03 16:47:46 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_bce DoughnutChart )InitializeDefaults (){_bce ._edf .VaryColors =_bbdc .NewCT_Boolean ();_bce ._edf .VaryColors .ValAttr =_acb .Bool (true );_bce ._edf .HoleSize =_bbdc .NewCT_HoleSize ();_bce ._edf .HoleSize .ValAttr =&_bbdc .ST_HoleSize {};_bce ._edf .HoleSize .ValAttr .ST_HoleSizeUByte =_acb .Uint8 (50);};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_cfed Bar3DChart )X ()*_bbdc .CT_Bar3DChart {return _cfed ._fgd };
|
|
|
|
|
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_fab Pie3DChart )InitializeDefaults (){_fab ._dcga .VaryColors =_bbdc .NewCT_Boolean ();_fab ._dcga .VaryColors .ValAttr =_acb .Bool (true );};type ValueAxis struct{_ccde *_bbdc .CT_ValAx };
|
2017-09-03 16:47:46 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_cbg Area3DChart )InitializeDefaults (){};
|
2017-09-04 15:32:59 -05:00
|
|
|
|
2017-09-03 16:47:46 -05:00
|
|
|
// X returns the inner wrapped XML type.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_ebdb PieChartSeries )X ()*_bbdc .CT_PieSer {return _ebdb ._feb };
|
2017-09-03 16:47:46 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bcd GridLines )X ()*_bbdc .CT_ChartLines {return _bcd ._bf };
|
2017-09-06 16:52:39 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_ef BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ef ._dfa .XVal ==nil {_ef ._dfa .XVal =_bbdc .NewCT_AxDataSource ();};return MakeAxisDataSource (_ef ._dfa .XVal );};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fcd ScatterChartSeries )X ()*_bbdc .CT_ScatterSer {return _fcd ._dfdf };func (_dad DataLabels )SetShowSeriesName (b bool ){_dad .ensureChoice ();_dad ._eab .Choice .ShowSerName =_bbdc .NewCT_Boolean ();_dad ._eab .Choice .ShowSerName .ValAttr =_acb .Bool (b );};
|
|
|
|
|
|
|
|
// Bar3DChart is a 3D bar chart.
|
|
|
|
type Bar3DChart struct{chartBase ;_fgd *_bbdc .CT_Bar3DChart ;};
|
|
|
|
|
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_eg PieChartSeries )Properties ()_ba .ShapeProperties {if _eg ._feb .SpPr ==nil {_eg ._feb .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_eg ._feb .SpPr );};func (_faf CategoryAxis )MajorGridLines ()GridLines {if _faf ._dcbca .MajorGridlines ==nil {_faf ._dcbca .MajorGridlines =_bbdc .NewCT_ChartLines ();};return GridLines {_faf ._dcbca .MajorGridlines };};
|
|
|
|
|
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_fg ScatterChartSeries )Properties ()_ba .ShapeProperties {if _fg ._dfdf .SpPr ==nil {_fg ._dfdf .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_fg ._dfdf .SpPr );};
|
|
|
|
|
|
|
|
// AddPieChart adds a new pie chart to a chart.
|
|
|
|
func (_ccd Chart )AddPieChart ()PieChart {_dba :=_bbdc .NewCT_PlotAreaChoice ();_ccd ._aaaf .Chart .PlotArea .Choice =append (_ccd ._aaaf .Chart .PlotArea .Choice ,_dba );_dba .PieChart =_bbdc .NewCT_PieChart ();_geaec :=PieChart {_bbd :_dba .PieChart };_geaec .InitializeDefaults ();return _geaec ;};
|
|
|
|
|
|
|
|
// BubbleChartSeries is a series to be used on a Bubble chart.
|
|
|
|
type BubbleChartSeries struct{_dfa *_bbdc .CT_BubbleSer };func (_bec chartBase )nextColor (_de int )_gcd .Color {return _cbd [_de %len (_cbd )]};
|
|
|
|
|
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_dfgg LineChartSeries )Properties ()_ba .ShapeProperties {if _dfgg ._cce .SpPr ==nil {_dfgg ._cce .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_dfgg ._cce .SpPr );};
|
|
|
|
|
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_eaa RadarChart )InitializeDefaults (){_eaa ._gcfb .RadarStyle .ValAttr =_bbdc .ST_RadarStyleMarker ;};
|
|
|
|
|
|
|
|
// Order returns the order of the series
|
|
|
|
func (_dd LineChartSeries )Order ()uint32 {return _dd ._cce .Order .ValAttr };
|
|
|
|
|
|
|
|
// AddSeries adds a default series to an Doughnut chart.
|
|
|
|
func (_fgf DoughnutChart )AddSeries ()PieChartSeries {_bga :=_bbdc .NewCT_PieSer ();_fgf ._edf .Ser =append (_fgf ._edf .Ser ,_bga );_bga .Idx .ValAttr =uint32 (len (_fgf ._edf .Ser )-1);_bga .Order .ValAttr =uint32 (len (_fgf ._edf .Ser )-1);_agd :=PieChartSeries {_bga };_agd .InitializeDefaults ();return _agd ;};func (_gcc ScatterChart )InitializeDefaults (){_gcc ._bbe .ScatterStyle .ValAttr =_bbdc .ST_ScatterStyleMarker ;};
|
|
|
|
|
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_dc Bar3DChart )InitializeDefaults (){_dc .SetDirection (_bbdc .ST_BarDirCol )};func (_ffd Marker )Properties ()_ba .ShapeProperties {if _ffd ._daf .SpPr ==nil {_ffd ._daf .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_ffd ._daf .SpPr );};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fbfg LineChartSeries )X ()*_bbdc .CT_LineSer {return _fbfg ._cce };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_feabe Title )X ()*_bbdc .CT_Title {return _feabe ._dcb };
|
|
|
|
|
|
|
|
// SetText sets the series text.
|
|
|
|
func (_bagf BubbleChartSeries )SetText (s string ){_bagf ._dfa .Tx =_bbdc .NewCT_SerTx ();_bagf ._dfa .Tx .Choice .V =&s ;};
|
|
|
|
|
|
|
|
// SetText sets the series text.
|
|
|
|
func (_ffb PieChartSeries )SetText (s string ){_ffb ._feb .Tx =_bbdc .NewCT_SerTx ();_ffb ._feb .Tx .Choice .V =&s ;};func (_daa DateAxis )SetTickLabelPosition (p _bbdc .ST_TickLblPos ){if p ==_bbdc .ST_TickLblPosUnset {_daa ._ebd .TickLblPos =nil ;}else {_daa ._ebd .TickLblPos =_bbdc .NewCT_TickLblPos ();_daa ._ebd .TickLblPos .ValAttr =p ;};};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_ge Pie3DChart )X ()*_bbdc .CT_Pie3DChart {return _ge ._dcga };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_gcfc BubbleChart )X ()*_bbdc .CT_BubbleChart {return _gcfc ._ebf };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_gdge LineChart )X ()*_bbdc .CT_LineChart {return _gdge ._bbg };func (_ccbc ValueAxis )SetCrosses (axis Axis ){_ccbc ._ccde .CrossAx .ValAttr =axis .AxisID ()};
|
|
|
|
|
|
|
|
// Properties returns the chart's shape properties.
|
|
|
|
func (_gcf Chart )Properties ()_ba .ShapeProperties {if _gcf ._aaaf .SpPr ==nil {_gcf ._aaaf .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_gcf ._aaaf .SpPr );};
|
|
|
|
|
|
|
|
// MakeAxisDataSource constructs an AxisDataSource wrapper.
|
|
|
|
func MakeAxisDataSource (x *_bbdc .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};func MakeChart (x *_bbdc .ChartSpace )Chart {return Chart {x }};type nullAxis byte ;
|
|
|
|
|
|
|
|
// AddSurfaceChart adds a new surface chart to a chart.
|
|
|
|
func (_dcg Chart )AddSurfaceChart ()SurfaceChart {_c :=_bbdc .NewCT_PlotAreaChoice ();_dcg ._aaaf .Chart .PlotArea .Choice =append (_dcg ._aaaf .Chart .PlotArea .Choice ,_c );_c .SurfaceChart =_bbdc .NewCT_SurfaceChart ();_gfac (_dcg ._aaaf .Chart );_dcg ._aaaf .Chart .View3D .RotX .ValAttr =_acb .Int8 (90);_dcg ._aaaf .Chart .View3D .RotY .ValAttr =_acb .Uint16 (0);_dcg ._aaaf .Chart .View3D .Perspective =_bbdc .NewCT_Perspective ();_dcg ._aaaf .Chart .View3D .Perspective .ValAttr =_acb .Uint8 (0);_feab :=SurfaceChart {_cbfb :_c .SurfaceChart };_feab .InitializeDefaults ();return _feab ;};
|
|
|
|
|
|
|
|
// Labels returns the data label properties.
|
|
|
|
func (_dgb ScatterChartSeries )Labels ()DataLabels {if _dgb ._dfdf .DLbls ==nil {_dgb ._dfdf .DLbls =_bbdc .NewCT_DLbls ();};return MakeDataLabels (_dgb ._dfdf .DLbls );};
|
2017-09-05 20:20:00 -04:00
|
|
|
|
2017-09-07 12:08:13 -04:00
|
|
|
// AddStockChart adds a new stock chart.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_abf Chart )AddStockChart ()StockChart {_ccgf :=_bbdc .NewCT_PlotAreaChoice ();_abf ._aaaf .Chart .PlotArea .Choice =append (_abf ._aaaf .Chart .PlotArea .Choice ,_ccgf );_ccgf .StockChart =_bbdc .NewCT_StockChart ();_gef :=StockChart {_dbc :_ccgf .StockChart };_gef .InitializeDefaults ();return _gef ;};type CategoryAxis struct{_dcbca *_bbdc .CT_CatAx };func _gfac (_ccg *_bbdc .CT_Chart ){_ccg .View3D =_bbdc .NewCT_View3D ();_ccg .View3D .RotX =_bbdc .NewCT_RotX ();_ccg .View3D .RotX .ValAttr =_acb .Int8 (15);_ccg .View3D .RotY =_bbdc .NewCT_RotY ();_ccg .View3D .RotY .ValAttr =_acb .Uint16 (20);_ccg .View3D .RAngAx =_bbdc .NewCT_Boolean ();_ccg .View3D .RAngAx .ValAttr =_acb .Bool (false );_ccg .Floor =_bbdc .NewCT_Surface ();_ccg .Floor .Thickness =_bbdc .NewCT_Thickness ();_ccg .Floor .Thickness .ValAttr .Uint32 =_acb .Uint32 (0);_ccg .SideWall =_bbdc .NewCT_Surface ();_ccg .SideWall .Thickness =_bbdc .NewCT_Thickness ();_ccg .SideWall .Thickness .ValAttr .Uint32 =_acb .Uint32 (0);_ccg .BackWall =_bbdc .NewCT_Surface ();_ccg .BackWall .Thickness =_bbdc .NewCT_Thickness ();_ccg .BackWall .Thickness .ValAttr .Uint32 =_acb .Uint32 (0);};func (_gff Legend )SetPosition (p _bbdc .ST_LegendPos ){if p ==_bbdc .ST_LegendPosUnset {_gff ._aag .LegendPos =nil ;}else {_gff ._aag .LegendPos =_bbdc .NewCT_LegendPos ();_gff ._aag .LegendPos .ValAttr =p ;};};
|
2017-09-07 12:08:13 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddCategoryAxis adds a category axis.
|
|
|
|
func (_bef Chart )AddCategoryAxis ()CategoryAxis {_dag :=_bbdc .NewCT_CatAx ();if _bef ._aaaf .Chart .PlotArea .CChoice ==nil {_bef ._aaaf .Chart .PlotArea .CChoice =_bbdc .NewCT_PlotAreaChoice1 ();};_dag .AxId =_bbdc .NewCT_UnsignedInt ();_dag .AxId .ValAttr =0x7FFFFFFF&_gda .Uint32 ();_bef ._aaaf .Chart .PlotArea .CChoice .CatAx =append (_bef ._aaaf .Chart .PlotArea .CChoice .CatAx ,_dag );_dag .Auto =_bbdc .NewCT_Boolean ();_dag .Auto .ValAttr =_acb .Bool (true );_dag .Delete =_bbdc .NewCT_Boolean ();_dag .Delete .ValAttr =_acb .Bool (false );_cgb :=MakeCategoryAxis (_dag );_cgb .InitializeDefaults ();return _cgb ;};
|
2017-09-07 12:08:13 -04:00
|
|
|
|
2017-09-04 15:32:59 -05:00
|
|
|
// AddBarChart adds a new bar chart to a chart.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_fde Chart )AddBarChart ()BarChart {_d :=_bbdc .NewCT_PlotAreaChoice ();_fde ._aaaf .Chart .PlotArea .Choice =append (_fde ._aaaf .Chart .PlotArea .Choice ,_d );_d .BarChart =_bbdc .NewCT_BarChart ();_d .BarChart .Grouping =_bbdc .NewCT_BarGrouping ();_d .BarChart .Grouping .ValAttr =_bbdc .ST_BarGroupingStandard ;_dbb :=BarChart {_aedb :_d .BarChart };_dbb .InitializeDefaults ();return _dbb ;};
|
2017-09-04 15:32:59 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// SetValues sets values directly on a source.
|
|
|
|
func (_gfa NumberDataSource )SetValues (v []float64 ){_gfa .ensureChoice ();_gfa ._gab .Choice .NumRef =nil ;_gfa ._gab .Choice .NumLit =_bbdc .NewCT_NumData ();_gfa ._gab .Choice .NumLit .PtCount =_bbdc .NewCT_UnsignedInt ();_gfa ._gab .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _cbaf ,_fdf :=range v {_gfa ._gab .Choice .NumLit .Pt =append (_gfa ._gab .Choice .NumLit .Pt ,&_bbdc .CT_NumVal {IdxAttr :uint32 (_cbaf ),V :_cdb .Sprintf ("\u0025\u0067",_fdf )});};};
|
2017-09-06 16:52:39 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// Pie3DChart is a Pie3D chart.
|
|
|
|
type Pie3DChart struct{chartBase ;_dcga *_bbdc .CT_Pie3DChart ;};
|
2017-09-06 17:02:21 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// PieChart is a Pie chart.
|
|
|
|
type PieChart struct{chartBase ;_bbd *_bbdc .CT_PieChart ;};
|
2017-09-06 17:02:21 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddSeries adds a default series to a line chart.
|
|
|
|
func (_bfb LineChart )AddSeries ()LineChartSeries {_bge :=_bfb .nextColor (len (_bfb ._bbg .Ser ));_gfab :=_bbdc .NewCT_LineSer ();_bfb ._bbg .Ser =append (_bfb ._bbg .Ser ,_gfab );_gfab .Idx .ValAttr =uint32 (len (_bfb ._bbg .Ser )-1);_gfab .Order .ValAttr =uint32 (len (_bfb ._bbg .Ser )-1);_gcg :=LineChartSeries {_gfab };_gcg .InitializeDefaults ();_gcg .Properties ().LineProperties ().SetSolidFill (_bge );return _gcg ;};func (_dcd ValueAxis )AxisID ()uint32 {return _dcd ._ccde .AxId .ValAttr };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_eaf Surface3DChart )X ()*_bbdc .CT_Surface3DChart {return _eaf ._fdd };func (_ea nullAxis )AxisID ()uint32 {return 0};
|
2017-09-06 17:04:42 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// Chart is a generic chart.
|
|
|
|
type Chart struct{_aaaf *_bbdc .ChartSpace };
|
2017-09-06 17:04:42 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddLineChart adds a new line chart to a chart.
|
|
|
|
func (_aae Chart )AddLineChart ()LineChart {_fe :=_bbdc .NewCT_PlotAreaChoice ();_aae ._aaaf .Chart .PlotArea .Choice =append (_aae ._aaaf .Chart .PlotArea .Choice ,_fe );_fe .LineChart =_bbdc .NewCT_LineChart ();_fe .LineChart .Grouping =_bbdc .NewCT_Grouping ();_fe .LineChart .Grouping .ValAttr =_bbdc .ST_GroupingStandard ;return LineChart {_bbg :_fe .LineChart };};
|
2017-09-06 17:24:30 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddAreaChart adds a new area chart to a chart.
|
|
|
|
func (_cfe Chart )AddAreaChart ()AreaChart {_cgbg :=_bbdc .NewCT_PlotAreaChoice ();_cfe ._aaaf .Chart .PlotArea .Choice =append (_cfe ._aaaf .Chart .PlotArea .Choice ,_cgbg );_cgbg .AreaChart =_bbdc .NewCT_AreaChart ();_agf :=AreaChart {_cc :_cgbg .AreaChart };_agf .InitializeDefaults ();return _agf ;};
|
2017-09-06 17:24:30 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddScatterChart adds a scatter (X/Y) chart.
|
|
|
|
func (_aa Chart )AddScatterChart ()ScatterChart {_eecf :=_bbdc .NewCT_PlotAreaChoice ();_aa ._aaaf .Chart .PlotArea .Choice =append (_aa ._aaaf .Chart .PlotArea .Choice ,_eecf );_eecf .ScatterChart =_bbdc .NewCT_ScatterChart ();_agdc :=ScatterChart {_bbe :_eecf .ScatterChart };_agdc .InitializeDefaults ();return _agdc ;};
|
2017-09-06 17:33:34 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// SetText sets the series text.
|
|
|
|
func (_bfgc RadarChartSeries )SetText (s string ){_bfgc ._df .Tx =_bbdc .NewCT_SerTx ();_bfgc ._df .Tx .Choice .V =&s ;};func (_gc DateAxis )MajorGridLines ()GridLines {if _gc ._ebd .MajorGridlines ==nil {_gc ._ebd .MajorGridlines =_bbdc .NewCT_ChartLines ();};return GridLines {_gc ._ebd .MajorGridlines };};
|
|
|
|
|
|
|
|
// BarChartSeries is a series to be used on a bar chart.
|
|
|
|
type BarChartSeries struct{_bdbg *_bbdc .CT_BarSer };
|
2017-09-06 17:33:34 -04:00
|
|
|
|
2017-09-06 17:36:49 -04:00
|
|
|
// AddPie3DChart adds a new pie chart to a chart.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_cfc Chart )AddPie3DChart ()Pie3DChart {_gfac (_cfc ._aaaf .Chart );_ccdg :=_bbdc .NewCT_PlotAreaChoice ();_cfc ._aaaf .Chart .PlotArea .Choice =append (_cfc ._aaaf .Chart .PlotArea .Choice ,_ccdg );_ccdg .Pie3DChart =_bbdc .NewCT_Pie3DChart ();_cba :=Pie3DChart {_dcga :_ccdg .Pie3DChart };_cba .InitializeDefaults ();return _cba ;};
|
2017-09-06 17:36:49 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// InitializeDefaults the Bubble chart to its defaults
|
|
|
|
func (_cge BubbleChart )InitializeDefaults (){};
|
2017-09-06 17:36:49 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddTitle sets a new title on the chart.
|
|
|
|
func (_dgd Chart )AddTitle ()Title {_dgd ._aaaf .Chart .Title =_bbdc .NewCT_Title ();_dgd ._aaaf .Chart .Title .Overlay =_bbdc .NewCT_Boolean ();_dgd ._aaaf .Chart .Title .Overlay .ValAttr =_acb .Bool (false );_dgd ._aaaf .Chart .AutoTitleDeleted =_bbdc .NewCT_Boolean ();_dgd ._aaaf .Chart .AutoTitleDeleted .ValAttr =_acb .Bool (false );_feag :=MakeTitle (_dgd ._aaaf .Chart .Title );_feag .InitializeDefaults ();return _feag ;};
|
|
|
|
|
|
|
|
// AddSeries adds a default series to an Radar chart.
|
|
|
|
func (_fagf RadarChart )AddSeries ()RadarChartSeries {_eecb :=_fagf .nextColor (len (_fagf ._gcfb .Ser ));_gcgd :=_bbdc .NewCT_RadarSer ();_fagf ._gcfb .Ser =append (_fagf ._gcfb .Ser ,_gcgd );_gcgd .Idx .ValAttr =uint32 (len (_fagf ._gcfb .Ser )-1);_gcgd .Order .ValAttr =uint32 (len (_fagf ._gcfb .Ser )-1);_dfd :=RadarChartSeries {_gcgd };_dfd .InitializeDefaults ();_dfd .Properties ().SetSolidFill (_eecb );return _dfd ;};type DateAxis struct{_ebd *_bbdc .CT_DateAx };
|
|
|
|
|
|
|
|
// InitializeDefaults initializes a Bubble chart series to the default values.
|
|
|
|
func (_agb BubbleChartSeries )InitializeDefaults (){};type LineChart struct{chartBase ;_bbg *_bbdc .CT_LineChart ;};
|
|
|
|
|
|
|
|
// SetText sets the series text.
|
|
|
|
func (_afffd AreaChartSeries )SetText (s string ){_afffd ._ead .Tx =_bbdc .NewCT_SerTx ();_afffd ._ead .Tx .Choice .V =&s ;};func (_aef Surface3DChart )InitializeDefaults (){_aef ._fdd .Wireframe =_bbdc .NewCT_Boolean ();_aef ._fdd .Wireframe .ValAttr =_acb .Bool (false );_aef ._fdd .BandFmts =_bbdc .NewCT_BandFmts ();for _fca :=0;_fca < 15;_fca ++{_aac :=_bbdc .NewCT_BandFmt ();_aac .Idx .ValAttr =uint32 (_fca );_aac .SpPr =_dge .NewCT_ShapeProperties ();_bdb :=_ba .MakeShapeProperties (_aac .SpPr );_bdb .SetSolidFill (_aef .nextColor (_fca ));_aef ._fdd .BandFmts .BandFmt =append (_aef ._fdd .BandFmts .BandFmt ,_aac );};};
|
|
|
|
|
|
|
|
// AddRadarChart adds a new radar chart to a chart.
|
|
|
|
func (_be Chart )AddRadarChart ()RadarChart {_cde :=_bbdc .NewCT_PlotAreaChoice ();_be ._aaaf .Chart .PlotArea .Choice =append (_be ._aaaf .Chart .PlotArea .Choice ,_cde );_cde .RadarChart =_bbdc .NewCT_RadarChart ();_baa :=RadarChart {_gcfb :_cde .RadarChart };_baa .InitializeDefaults ();return _baa ;};
|
2017-09-07 09:03:05 -04:00
|
|
|
|
2017-09-07 09:08:32 -04:00
|
|
|
// AddSurface3DChart adds a new 3D surface chart to a chart.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_dcec Chart )AddSurface3DChart ()Surface3DChart {_fed :=_bbdc .NewCT_PlotAreaChoice ();_dcec ._aaaf .Chart .PlotArea .Choice =append (_dcec ._aaaf .Chart .PlotArea .Choice ,_fed );_fed .Surface3DChart =_bbdc .NewCT_Surface3DChart ();_gfac (_dcec ._aaaf .Chart );_feae :=Surface3DChart {_fdd :_fed .Surface3DChart };_feae .InitializeDefaults ();return _feae ;};func (_defd SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _defd ._fdeg .Cat ==nil {_defd ._fdeg .Cat =_bbdc .NewCT_AxDataSource ();};return MakeAxisDataSource (_defd ._fdeg .Cat );};func MakeMarker (x *_bbdc .CT_Marker )Marker {return Marker {x }};type ScatterChart struct{chartBase ;_bbe *_bbdc .CT_ScatterChart ;};
|
2017-09-07 09:08:32 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// BarChart is a 2D bar chart.
|
|
|
|
type BarChart struct{chartBase ;_aedb *_bbdc .CT_BarChart ;};func (_fbc RadarChart )AddAxis (axis Axis ){_bfad :=_bbdc .NewCT_UnsignedInt ();_bfad .ValAttr =axis .AxisID ();_fbc ._gcfb .AxId =append (_fbc ._gcfb .AxId ,_bfad );};func (_dca ValueAxis )SetTickLabelPosition (p _bbdc .ST_TickLblPos ){if p ==_bbdc .ST_TickLblPosUnset {_dca ._ccde .TickLblPos =nil ;}else {_dca ._ccde .TickLblPos =_bbdc .NewCT_TickLblPos ();_dca ._ccde .TickLblPos .ValAttr =p ;};};func MakeNumberDataSource (x *_bbdc .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func (_bccf DateAxis )Properties ()_ba .ShapeProperties {if _bccf ._ebd .SpPr ==nil {_bccf ._ebd .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_bccf ._ebd .SpPr );};func (_ddd SurfaceChart )InitializeDefaults (){_ddd ._cbfb .Wireframe =_bbdc .NewCT_Boolean ();_ddd ._cbfb .Wireframe .ValAttr =_acb .Bool (false );_ddd ._cbfb .BandFmts =_bbdc .NewCT_BandFmts ();for _bcbe :=0;_bcbe < 15;_bcbe ++{_bbc :=_bbdc .NewCT_BandFmt ();_bbc .Idx .ValAttr =uint32 (_bcbe );_bbc .SpPr =_dge .NewCT_ShapeProperties ();_gcdc :=_ba .MakeShapeProperties (_bbc .SpPr );_gcdc .SetSolidFill (_ddd .nextColor (_bcbe ));_ddd ._cbfb .BandFmts .BandFmt =append (_ddd ._cbfb .BandFmts .BandFmt ,_bbc );};};func (_bba DataLabels )SetShowCategoryName (b bool ){_bba .ensureChoice ();_bba ._eab .Choice .ShowCatName =_bbdc .NewCT_Boolean ();_bba ._eab .Choice .ShowCatName .ValAttr =_acb .Bool (b );};func (_cbgb LineChartSeries )InitializeDefaults (){_cbgb .Properties ().LineProperties ().SetWidth (1*_cdg .Point );_cbgb .Properties ().LineProperties ().SetSolidFill (_gcd .Black );_cbgb .Properties ().LineProperties ().SetJoin (_ba .LineJoinRound );_cbgb .Marker ().SetSymbol (_bbdc .ST_MarkerStyleNone );_cbgb .Labels ().SetShowLegendKey (false );_cbgb .Labels ().SetShowValue (false );_cbgb .Labels ().SetShowPercent (false );_cbgb .Labels ().SetShowCategoryName (false );_cbgb .Labels ().SetShowSeriesName (false );_cbgb .Labels ().SetShowLeaderLines (false );};func (_fdc CategoryAxis )InitializeDefaults (){_fdc .SetPosition (_bbdc .ST_AxPosB );_fdc .SetMajorTickMark (_bbdc .ST_TickMarkOut );_fdc .SetMinorTickMark (_bbdc .ST_TickMarkIn );_fdc .SetTickLabelPosition (_bbdc .ST_TickLblPosNextTo );_fdc .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gcd .LightGray );_fdc .Properties ().LineProperties ().SetSolidFill (_gcd .Black );};
|
2017-09-07 09:08:32 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddSeries adds a default series to an area chart.
|
|
|
|
func (_gfd AreaChart )AddSeries ()AreaChartSeries {_eafg :=_gfd .nextColor (len (_gfd ._cc .Ser ));_fag :=_bbdc .NewCT_AreaSer ();_gfd ._cc .Ser =append (_gfd ._cc .Ser ,_fag );_fag .Idx .ValAttr =uint32 (len (_gfd ._cc .Ser )-1);_fag .Order .ValAttr =uint32 (len (_gfd ._cc .Ser )-1);_aff :=AreaChartSeries {_fag };_aff .InitializeDefaults ();_aff .Properties ().SetSolidFill (_eafg );return _aff ;};func (_eae NumberDataSource )ensureChoice (){if _eae ._gab .Choice ==nil {_eae ._gab .Choice =_bbdc .NewCT_NumDataSourceChoice ();};};
|
2017-09-07 09:45:34 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
|
|
|
|
type RadarChart struct{chartBase ;_gcfb *_bbdc .CT_RadarChart ;};
|
2017-09-07 09:45:34 -04:00
|
|
|
|
2017-09-07 09:55:22 -04:00
|
|
|
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_baf Chart )AddDoughnutChart ()DoughnutChart {_ddec :=_bbdc .NewCT_PlotAreaChoice ();_baf ._aaaf .Chart .PlotArea .Choice =append (_baf ._aaaf .Chart .PlotArea .Choice ,_ddec );_ddec .DoughnutChart =_bbdc .NewCT_DoughnutChart ();_gaec :=DoughnutChart {_edf :_ddec .DoughnutChart };_gaec .InitializeDefaults ();return _gaec ;};
|
2017-09-07 09:55:22 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// SetDisplayBlanksAs controls how missing values are displayed.
|
|
|
|
func (_ff Chart )SetDisplayBlanksAs (v _bbdc .ST_DispBlanksAs ){_ff ._aaaf .Chart .DispBlanksAs =_bbdc .NewCT_DispBlanksAs ();_ff ._aaaf .Chart .DispBlanksAs .ValAttr =v ;};func (_b CategoryAxis )SetMinorTickMark (m _bbdc .ST_TickMark ){if m ==_bbdc .ST_TickMarkUnset {_b ._dcbca .MinorTickMark =nil ;}else {_b ._dcbca .MinorTickMark =_bbdc .NewCT_TickMark ();_b ._dcbca .MinorTickMark .ValAttr =m ;};};type SeriesAxis struct{_ffc *_bbdc .CT_SerAx };
|
|
|
|
|
|
|
|
// SetNumberReference is used to set the source data to a range of cells containing
|
|
|
|
// numbers.
|
|
|
|
func (_ac CategoryAxisDataSource )SetNumberReference (s string ){_ac ._bdaf .Choice =_bbdc .NewCT_AxDataSourceChoice ();_ac ._bdaf .Choice .NumRef =_bbdc .NewCT_NumRef ();_ac ._bdaf .Choice .NumRef .F =s ;};func (_ddg DataLabels )SetShowLeaderLines (b bool ){_ddg .ensureChoice ();_ddg ._eab .Choice .ShowLeaderLines =_bbdc .NewCT_Boolean ();_ddg ._eab .Choice .ShowLeaderLines .ValAttr =_acb .Bool (b );};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bb Legend )X ()*_bbdc .CT_Legend {return _bb ._aag };
|
|
|
|
|
|
|
|
// SetValues is used to set the source data to a set of values.
|
|
|
|
func (_afde CategoryAxisDataSource )SetValues (v []string ){_afde ._bdaf .Choice =_bbdc .NewCT_AxDataSourceChoice ();_afde ._bdaf .Choice .StrLit =_bbdc .NewCT_StrData ();_afde ._bdaf .Choice .StrLit .PtCount =_bbdc .NewCT_UnsignedInt ();_afde ._bdaf .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _bdec ,_ecbe :=range v {_afde ._bdaf .Choice .StrLit .Pt =append (_afde ._bdaf .Choice .StrLit .Pt ,&_bbdc .CT_StrVal {IdxAttr :uint32 (_bdec ),V :_ecbe });};};
|
2017-09-07 09:27:41 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddAxis adds an axis to a Surface chart.
|
|
|
|
func (_ae Surface3DChart )AddAxis (axis Axis ){_bfec :=_bbdc .NewCT_UnsignedInt ();_bfec .ValAttr =axis .AxisID ();_ae ._fdd .AxId =append (_ae ._fdd .AxId ,_bfec );};func (_cgg BubbleChart )AddAxis (axis Axis ){_ede :=_bbdc .NewCT_UnsignedInt ();_ede .ValAttr =axis .AxisID ();_cgg ._ebf .AxId =append (_cgg ._ebf .AxId ,_ede );};
|
2017-09-07 09:27:41 -04:00
|
|
|
|
2017-09-07 10:54:54 -04:00
|
|
|
// AddBubbleChart adds a new bubble chart.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_fad Chart )AddBubbleChart ()BubbleChart {_feba :=_bbdc .NewCT_PlotAreaChoice ();_fad ._aaaf .Chart .PlotArea .Choice =append (_fad ._aaaf .Chart .PlotArea .Choice ,_feba );_feba .BubbleChart =_bbdc .NewCT_BubbleChart ();_fbeb :=BubbleChart {_ebf :_feba .BubbleChart };_fbeb .InitializeDefaults ();return _fbeb ;};
|
2017-09-07 10:54:54 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// Marker returns the marker properties.
|
|
|
|
func (_dgf LineChartSeries )Marker ()Marker {if _dgf ._cce .Marker ==nil {_dgf ._cce .Marker =_bbdc .NewCT_Marker ();};return MakeMarker (_dgf ._cce .Marker );};
|
2017-09-07 10:54:54 -04:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddSeries adds a default series to a bar chart.
|
|
|
|
func (_fabd Bar3DChart )AddSeries ()BarChartSeries {_cgc :=_fabd .nextColor (len (_fabd ._fgd .Ser ));_cec :=_bbdc .NewCT_BarSer ();_fabd ._fgd .Ser =append (_fabd ._fgd .Ser ,_cec );_cec .Idx .ValAttr =uint32 (len (_fabd ._fgd .Ser )-1);_cec .Order .ValAttr =uint32 (len (_fabd ._fgd .Ser )-1);_bab :=BarChartSeries {_cec };_bab .InitializeDefaults ();_bab .Properties ().SetSolidFill (_cgc );return _bab ;};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddSeries adds a default series to an Pie chart.
|
|
|
|
func (_cdf PieChart )AddSeries ()PieChartSeries {_fgde :=_bbdc .NewCT_PieSer ();_cdf ._bbd .Ser =append (_cdf ._bbd .Ser ,_fgde );_fgde .Idx .ValAttr =uint32 (len (_cdf ._bbd .Ser )-1);_fgde .Order .ValAttr =uint32 (len (_cdf ._bbd .Ser )-1);_ded :=PieChartSeries {_fgde };_ded .InitializeDefaults ();return _ded ;};func (_bbb ValueAxis )Properties ()_ba .ShapeProperties {if _bbb ._ccde .SpPr ==nil {_bbb ._ccde .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_bbb ._ccde .SpPr );};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_eb SurfaceChartSeries )X ()*_bbdc .CT_SurfaceSer {return _eb ._fdeg };
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_efd RadarChartSeries )Properties ()_ba .ShapeProperties {if _efd ._df .SpPr ==nil {_efd ._df .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_efd ._df .SpPr );};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_adg BarChart )InitializeDefaults (){_adg .SetDirection (_bbdc .ST_BarDirCol )};func (_gaa Bar3DChart )AddAxis (axis Axis ){_gb :=_bbdc .NewCT_UnsignedInt ();_gb .ValAttr =axis .AxisID ();_gaa ._fgd .AxId =append (_gaa ._fgd .AxId ,_gb );};func MakeTitle (x *_bbdc .CT_Title )Title {return Title {x }};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddBar3DChart adds a new 3D bar chart to a chart.
|
|
|
|
func (_gdg Chart )AddBar3DChart ()Bar3DChart {_gfac (_gdg ._aaaf .Chart );_bac :=_bbdc .NewCT_PlotAreaChoice ();_gdg ._aaaf .Chart .PlotArea .Choice =append (_gdg ._aaaf .Chart .PlotArea .Choice ,_bac );_bac .Bar3DChart =_bbdc .NewCT_Bar3DChart ();_bac .Bar3DChart .Grouping =_bbdc .NewCT_BarGrouping ();_bac .Bar3DChart .Grouping .ValAttr =_bbdc .ST_BarGroupingStandard ;_egae :=Bar3DChart {_fgd :_bac .Bar3DChart };_egae .InitializeDefaults ();return _egae ;};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// AddSeries adds a default series to a Surface chart.
|
|
|
|
func (_adgd Surface3DChart )AddSeries ()SurfaceChartSeries {_bfdc :=_adgd .nextColor (len (_adgd ._fdd .Ser ));_dbcg :=_bbdc .NewCT_SurfaceSer ();_adgd ._fdd .Ser =append (_adgd ._fdd .Ser ,_dbcg );_dbcg .Idx .ValAttr =uint32 (len (_adgd ._fdd .Ser )-1);_dbcg .Order .ValAttr =uint32 (len (_adgd ._fdd .Ser )-1);_gbf :=SurfaceChartSeries {_dbcg };_gbf .InitializeDefaults ();_gbf .Properties ().LineProperties ().SetSolidFill (_bfdc );return _gbf ;};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bdc PieOfPieChart )X ()*_bbdc .CT_OfPieChart {return _bdc ._bda };
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// InitializeDefaults the Stock chart to its defaults
|
|
|
|
func (_g StockChart )InitializeDefaults (){_g ._dbc .HiLowLines =_bbdc .NewCT_ChartLines ();_g ._dbc .UpDownBars =_bbdc .NewCT_UpDownBars ();_g ._dbc .UpDownBars .GapWidth =_bbdc .NewCT_GapAmount ();_g ._dbc .UpDownBars .GapWidth .ValAttr =&_bbdc .ST_GapAmount {};_g ._dbc .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_acb .Uint16 (150);_g ._dbc .UpDownBars .UpBars =_bbdc .NewCT_UpDownBar ();_g ._dbc .UpDownBars .DownBars =_bbdc .NewCT_UpDownBar ();};func (_eee DataLabels )ensureChoice (){if _eee ._eab .Choice ==nil {_eee ._eab .Choice =_bbdc .NewCT_DLblsChoice ();};};func (_bfd SeriesAxis )InitializeDefaults (){};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_fgb BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fgb ._bdbg .Cat ==nil {_fgb ._bdbg .Cat =_bbdc .NewCT_AxDataSource ();};return MakeAxisDataSource (_fgb ._bdbg .Cat );};
|
|
|
|
|
|
|
|
// AddSeries adds a default series to a Stock chart.
|
|
|
|
func (_beb StockChart )AddSeries ()LineChartSeries {_edb :=_bbdc .NewCT_LineSer ();_beb ._dbc .Ser =append (_beb ._dbc .Ser ,_edb );_edb .Idx .ValAttr =uint32 (len (_beb ._dbc .Ser )-1);_edb .Order .ValAttr =uint32 (len (_beb ._dbc .Ser )-1);_ca :=LineChartSeries {_edb };_ca .Values ().CreateEmptyNumberCache ();_ca .Properties ().LineProperties ().SetNoFill ();return _ca ;};func (_eef ValueAxis )MajorGridLines ()GridLines {if _eef ._ccde .MajorGridlines ==nil {_eef ._ccde .MajorGridlines =_bbdc .NewCT_ChartLines ();};return GridLines {_eef ._ccde .MajorGridlines };};
|
|
|
|
|
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_ced LineChartSeries )SetIndex (idx uint32 ){_ced ._cce .Idx .ValAttr =idx };func (_bff Chart )AddSeriesAxis ()SeriesAxis {_dfgc :=_bbdc .NewCT_SerAx ();if _bff ._aaaf .Chart .PlotArea .CChoice ==nil {_bff ._aaaf .Chart .PlotArea .CChoice =_bbdc .NewCT_PlotAreaChoice1 ();};_dfgc .AxId =_bbdc .NewCT_UnsignedInt ();_dfgc .AxId .ValAttr =0x7FFFFFFF&_gda .Uint32 ();_bff ._aaaf .Chart .PlotArea .CChoice .SerAx =append (_bff ._aaaf .Chart .PlotArea .CChoice .SerAx ,_dfgc );_dfgc .Delete =_bbdc .NewCT_Boolean ();_dfgc .Delete .ValAttr =_acb .Bool (false );_db :=MakeSeriesAxis (_dfgc );_db .InitializeDefaults ();return _db ;};func (_acg CategoryAxis )AxisID ()uint32 {return _acg ._dcbca .AxId .ValAttr };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bcc BubbleChartSeries )X ()*_bbdc .CT_BubbleSer {return _bcc ._dfa };type SurfaceChartSeries struct{_fdeg *_bbdc .CT_SurfaceSer };func (_gag StockChart )AddAxis (axis Axis ){_adc :=_bbdc .NewCT_UnsignedInt ();_adc .ValAttr =axis .AxisID ();_gag ._dbc .AxId =append (_gag ._dbc .AxId ,_adc );};
|
|
|
|
|
|
|
|
// Axis is the interface implemented by different axes when assigning to a
|
|
|
|
// chart.
|
|
|
|
type Axis interface{AxisID ()uint32 ;};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bgc Area3DChart )X ()*_bbdc .CT_Area3DChart {return _bgc ._cggb };func (_ee CategoryAxis )SetCrosses (axis Axis ){_ee ._dcbca .Choice =_bbdc .NewEG_AxSharedChoice ();_ee ._dcbca .Choice .Crosses =_bbdc .NewCT_Crosses ();_ee ._dcbca .Choice .Crosses .ValAttr =_bbdc .ST_CrossesAutoZero ;_ee ._dcbca .CrossAx .ValAttr =axis .AxisID ();};func (_cef LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cef ._cce .Cat ==nil {_cef ._cce .Cat =_bbdc .NewCT_AxDataSource ();};return MakeAxisDataSource (_cef ._cce .Cat );};func (_ace SeriesAxis )AxisID ()uint32 {return _ace ._ffc .AxId .ValAttr };
|
|
|
|
|
|
|
|
// Index returns the index of the series
|
|
|
|
func (_bfgd ScatterChartSeries )Index ()uint32 {return _bfgd ._dfdf .Idx .ValAttr };
|
|
|
|
|
|
|
|
// AddLine3DChart adds a new 3D line chart to a chart.
|
|
|
|
func (_ccgc Chart )AddLine3DChart ()Line3DChart {_gfac (_ccgc ._aaaf .Chart );_dadc :=_bbdc .NewCT_PlotAreaChoice ();_ccgc ._aaaf .Chart .PlotArea .Choice =append (_ccgc ._aaaf .Chart .PlotArea .Choice ,_dadc );_dadc .Line3DChart =_bbdc .NewCT_Line3DChart ();_dadc .Line3DChart .Grouping =_bbdc .NewCT_Grouping ();_dadc .Line3DChart .Grouping .ValAttr =_bbdc .ST_GroupingStandard ;return Line3DChart {_eeb :_dadc .Line3DChart };};
|
|
|
|
|
|
|
|
// PieChartSeries is a series to be used on an Pie chart.
|
|
|
|
type PieChartSeries struct{_feb *_bbdc .CT_PieSer };func (_dfg DataLabels )SetPosition (p _bbdc .ST_DLblPos ){_dfg .ensureChoice ();_dfg ._eab .Choice .DLblPos =_bbdc .NewCT_DLblPos ();_dfg ._eab .Choice .DLblPos .ValAttr =p ;};
|
|
|
|
|
|
|
|
// RemoveTitle removes any existing title from the chart.
|
|
|
|
func (_cfd Chart )RemoveTitle (){_cfd ._aaaf .Chart .Title =nil ;_cfd ._aaaf .Chart .AutoTitleDeleted =_bbdc .NewCT_Boolean ();_cfd ._aaaf .Chart .AutoTitleDeleted .ValAttr =_acb .Bool (true );};var NullAxis Axis =nullAxis (0);
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fdb StockChart )X ()*_bbdc .CT_StockChart {return _fdb ._dbc };
|
|
|
|
|
|
|
|
// InitializeDefaults initializes a bar chart series to the default values.
|
|
|
|
func (_ceg BarChartSeries )InitializeDefaults (){};func (_gea DateAxis )SetPosition (p _bbdc .ST_AxPos ){_gea ._ebd .AxPos =_bbdc .NewCT_AxPos ();_gea ._ebd .AxPos .ValAttr =p ;};
|
2017-09-05 20:20:00 -04:00
|
|
|
|
2017-09-04 10:50:29 -05:00
|
|
|
// RemoveLegend removes the legend if the chart has one.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_dcbc Chart )RemoveLegend (){_dcbc ._aaaf .Chart .Legend =nil };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_feaeb BarChart )X ()*_bbdc .CT_BarChart {return _feaeb ._aedb };
|
|
|
|
|
|
|
|
// InitializeDefaults initializes an area series to the default values.
|
|
|
|
func (_abc AreaChartSeries )InitializeDefaults (){};type Line3DChart struct{chartBase ;_eeb *_bbdc .CT_Line3DChart ;};
|
|
|
|
|
|
|
|
// InitializeDefaults initializes an Pie series to the default values.
|
|
|
|
func (_ada PieChartSeries )InitializeDefaults (){};
|
|
|
|
|
|
|
|
// Values returns the value data source.
|
|
|
|
func (_cff RadarChartSeries )Values ()NumberDataSource {if _cff ._df .Val ==nil {_cff ._df .Val =_bbdc .NewCT_NumDataSource ();};return MakeNumberDataSource (_cff ._df .Val );};type NumberDataSource struct{_gab *_bbdc .CT_NumDataSource };func (_ga DateAxis )SetMajorTickMark (m _bbdc .ST_TickMark ){if m ==_bbdc .ST_TickMarkUnset {_ga ._ebd .MajorTickMark =nil ;}else {_ga ._ebd .MajorTickMark =_bbdc .NewCT_TickMark ();_ga ._ebd .MajorTickMark .ValAttr =m ;};};func (_cdd ScatterChartSeries )Values ()NumberDataSource {if _cdd ._dfdf .YVal ==nil {_cdd ._dfdf .YVal =_bbdc .NewCT_NumDataSource ();};return MakeNumberDataSource (_cdd ._dfdf .YVal );};
|
|
|
|
|
|
|
|
// SetText sets the series text
|
|
|
|
func (_a ScatterChartSeries )SetText (s string ){_a ._dfdf .Tx =_bbdc .NewCT_SerTx ();_a ._dfdf .Tx .Choice .V =&s ;};
|
|
|
|
|
|
|
|
// LineChartSeries is the data series for a line chart.
|
|
|
|
type LineChartSeries struct{_cce *_bbdc .CT_LineSer };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_ecc DoughnutChart )X ()*_bbdc .CT_DoughnutChart {return _ecc ._edf };func (_fbf AreaChart )AddAxis (axis Axis ){_cb :=_bbdc .NewCT_UnsignedInt ();_cb .ValAttr =axis .AxisID ();_fbf ._cc .AxId =append (_fbf ._cc .AxId ,_cb );};func (_fbg Legend )Properties ()_ba .ShapeProperties {if _fbg ._aag .SpPr ==nil {_fbg ._aag .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_fbg ._aag .SpPr );};func (_bag DateAxis )SetMinorTickMark (m _bbdc .ST_TickMark ){if m ==_bbdc .ST_TickMarkUnset {_bag ._ebd .MinorTickMark =nil ;}else {_bag ._ebd .MinorTickMark =_bbdc .NewCT_TickMark ();_bag ._ebd .MinorTickMark .ValAttr =m ;};};func (_aed Title )ParagraphProperties ()_ba .ParagraphProperties {if _aed ._dcb .Tx ==nil {_aed .SetText ("");};if _aed ._dcb .Tx .Choice .Rich .P [0].PPr ==nil {_aed ._dcb .Tx .Choice .Rich .P [0].PPr =_dge .NewCT_TextParagraphProperties ();};return _ba .MakeParagraphProperties (_aed ._dcb .Tx .Choice .Rich .P [0].PPr );};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_ab ScatterChart )X ()*_bbdc .CT_ScatterChart {return _ab ._bbe };func (_bfg Title )RunProperties ()_ba .RunProperties {if _bfg ._dcb .Tx ==nil {_bfg .SetText ("");};if _bfg ._dcb .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_bfg ._dcb .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_dge .NewCT_TextCharacterProperties ();};return _ba .MakeRunProperties (_bfg ._dcb .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};
|
|
|
|
|
|
|
|
// Order returns the order of the series
|
|
|
|
func (_ed SurfaceChartSeries )Order ()uint32 {return _ed ._fdeg .Order .ValAttr };func (_ffa Marker )SetSymbol (s _bbdc .ST_MarkerStyle ){if s ==_bbdc .ST_MarkerStyleUnset {_ffa ._daf .Symbol =nil ;}else {_ffa ._daf .Symbol =_bbdc .NewCT_MarkerStyle ();_ffa ._daf .Symbol .ValAttr =s ;};};
|
|
|
|
|
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_eecd ScatterChartSeries )SetOrder (idx uint32 ){_eecd ._dfdf .Order .ValAttr =idx };
|
|
|
|
|
|
|
|
// Order returns the order of the series
|
|
|
|
func (_cgf ScatterChartSeries )Order ()uint32 {return _cgf ._dfdf .Order .ValAttr };
|
|
|
|
|
|
|
|
// SetDirection changes the direction of the bar chart (bar or column).
|
|
|
|
func (_cfbd Bar3DChart )SetDirection (d _bbdc .ST_BarDir ){_cfbd ._fgd .BarDir .ValAttr =d };
|
|
|
|
|
|
|
|
// InitializeDefaults initializes an Radar series to the default values.
|
|
|
|
func (_ddea RadarChartSeries )InitializeDefaults (){};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_ceb PieChart )X ()*_bbdc .CT_PieChart {return _ceb ._bbd };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_dce Chart )X ()*_bbdc .ChartSpace {return _dce ._aaaf };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_aaf Marker )X ()*_bbdc .CT_Marker {return _aaf ._daf };func MakeValueAxis (x *_bbdc .CT_ValAx )ValueAxis {return ValueAxis {x }};
|
|
|
|
|
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_ffce PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ffce ._feb .Cat ==nil {_ffce ._feb .Cat =_bbdc .NewCT_AxDataSource ();};return MakeAxisDataSource (_ffce ._feb .Cat );};
|
|
|
|
|
|
|
|
// Labels returns the data label properties.
|
|
|
|
func (_bde LineChartSeries )Labels ()DataLabels {if _bde ._cce .DLbls ==nil {_bde ._cce .DLbls =_bbdc .NewCT_DLbls ();};return MakeDataLabels (_bde ._cce .DLbls );};
|
|
|
|
|
|
|
|
// AddSeries adds a default series to a Surface chart.
|
|
|
|
func (_def SurfaceChart )AddSeries ()SurfaceChartSeries {_cged :=_def .nextColor (len (_def ._cbfb .Ser ));_af :=_bbdc .NewCT_SurfaceSer ();_def ._cbfb .Ser =append (_def ._cbfb .Ser ,_af );_af .Idx .ValAttr =uint32 (len (_def ._cbfb .Ser )-1);_af .Order .ValAttr =uint32 (len (_def ._cbfb .Ser )-1);_ece :=SurfaceChartSeries {_af };_ece .InitializeDefaults ();_ece .Properties ().LineProperties ().SetSolidFill (_cged );return _ece ;};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_dff BarChartSeries )X ()*_bbdc .CT_BarSer {return _dff ._bdbg };
|
|
|
|
|
|
|
|
// BubbleChart is a 2D Bubble chart.
|
|
|
|
type BubbleChart struct{chartBase ;_ebf *_bbdc .CT_BubbleChart ;};
|
|
|
|
|
|
|
|
// AddAxis adds an axis to a line chart.
|
|
|
|
func (_efe Line3DChart )AddAxis (axis Axis ){_bfa :=_bbdc .NewCT_UnsignedInt ();_bfa .ValAttr =axis .AxisID ();_efe ._eeb .AxId =append (_efe ._eeb .AxId ,_bfa );};func (_begc DataLabels )SetShowValue (b bool ){_begc .ensureChoice ();_begc ._eab .Choice .ShowVal =_bbdc .NewCT_Boolean ();_begc ._eab .Choice .ShowVal .ValAttr =_acb .Bool (b );};
|
|
|
|
|
|
|
|
// SetDirection changes the direction of the bar chart (bar or column).
|
|
|
|
func (_dg BarChart )SetDirection (d _bbdc .ST_BarDir ){_dg ._aedb .BarDir .ValAttr =d };
|
|
|
|
|
|
|
|
// Marker returns the marker properties.
|
|
|
|
func (_cdgd ScatterChartSeries )Marker ()Marker {if _cdgd ._dfdf .Marker ==nil {_cdgd ._dfdf .Marker =_bbdc .NewCT_Marker ();};return MakeMarker (_cdgd ._dfdf .Marker );};
|
|
|
|
|
|
|
|
// CategoryAxisDataSource specifies the data for an axis. It's commonly used with
|
|
|
|
// SetReference to set the axis data to a range of cells.
|
|
|
|
type CategoryAxisDataSource struct{_bdaf *_bbdc .CT_AxDataSource };
|
|
|
|
|
|
|
|
// SetText sets the series text
|
|
|
|
func (_bcda LineChartSeries )SetText (s string ){_bcda ._cce .Tx =_bbdc .NewCT_SerTx ();_bcda ._cce .Tx .Choice .V =&s ;};func (_ffg Area3DChart )AddAxis (axis Axis ){_ce :=_bbdc .NewCT_UnsignedInt ();_ce .ValAttr =axis .AxisID ();_ffg ._cggb .AxId =append (_ffg ._cggb .AxId ,_ce );};func (_afa CategoryAxis )SetMajorTickMark (m _bbdc .ST_TickMark ){if m ==_bbdc .ST_TickMarkUnset {_afa ._dcbca .MajorTickMark =nil ;}else {_afa ._dcbca .MajorTickMark =_bbdc .NewCT_TickMark ();_afa ._dcbca .MajorTickMark .ValAttr =m ;};};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fb AreaChart )X ()*_bbdc .CT_AreaChart {return _fb ._cc };
|
|
|
|
|
|
|
|
// AddPieOfPieChart adds a new pie chart to a chart.
|
|
|
|
func (_fee Chart )AddPieOfPieChart ()PieOfPieChart {_fga :=_bbdc .NewCT_PlotAreaChoice ();_fee ._aaaf .Chart .PlotArea .Choice =append (_fee ._aaaf .Chart .PlotArea .Choice ,_fga );_fga .OfPieChart =_bbdc .NewCT_OfPieChart ();_cgce :=PieOfPieChart {_bda :_fga .OfPieChart };_cgce .InitializeDefaults ();return _cgce ;};
|
|
|
|
|
|
|
|
// AddAxis adds an axis to a Scatter chart.
|
|
|
|
func (_gba ScatterChart )AddAxis (axis Axis ){_gabc :=_bbdc .NewCT_UnsignedInt ();_gabc .ValAttr =axis .AxisID ();_gba ._bbe .AxId =append (_gba ._bbe .AxId ,_gabc );};
|
|
|
|
|
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_bged RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bged ._df .Cat ==nil {_bged ._df .Cat =_bbdc .NewCT_AxDataSource ();};return MakeAxisDataSource (_bged ._df .Cat );};func (_gbg Marker )SetSize (sz uint8 ){_gbg ._daf .Size =_bbdc .NewCT_MarkerSize ();_gbg ._daf .Size .ValAttr =&sz ;};
|
|
|
|
|
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_defe BarChartSeries )Properties ()_ba .ShapeProperties {if _defe ._bdbg .SpPr ==nil {_defe ._bdbg .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_defe ._bdbg .SpPr );};
|
|
|
|
|
|
|
|
// AddAxis adds an axis to a Surface chart.
|
|
|
|
func (_dde SurfaceChart )AddAxis (axis Axis ){_ebe :=_bbdc .NewCT_UnsignedInt ();_ebe .ValAttr =axis .AxisID ();_dde ._cbfb .AxId =append (_dde ._cbfb .AxId ,_ebe );};func (_ebbd LineChartSeries )SetSmooth (b bool ){_ebbd ._cce .Smooth =_bbdc .NewCT_Boolean ();_ebbd ._cce .Smooth .ValAttr =&b ;};
|
|
|
|
|
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_cbdc PieOfPieChart )InitializeDefaults (){_cbdc ._bda .VaryColors =_bbdc .NewCT_Boolean ();_cbdc ._bda .VaryColors .ValAttr =_acb .Bool (true );_cbdc .SetType (_bbdc .ST_OfPieTypePie );_cbdc ._bda .SecondPieSize =_bbdc .NewCT_SecondPieSize ();_cbdc ._bda .SecondPieSize .ValAttr =&_bbdc .ST_SecondPieSize {};_cbdc ._bda .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_acb .Uint16 (75);_bcb :=_bbdc .NewCT_ChartLines ();_bcb .SpPr =_dge .NewCT_ShapeProperties ();_gf :=_ba .MakeShapeProperties (_bcb .SpPr );_gf .LineProperties ().SetSolidFill (_gcd .Auto );_cbdc ._bda .SerLines =append (_cbdc ._bda .SerLines ,_bcb );};
|
|
|
|
|
|
|
|
// Values returns the value data source.
|
|
|
|
func (_ccgb PieChartSeries )Values ()NumberDataSource {if _ccgb ._feb .Val ==nil {_ccgb ._feb .Val =_bbdc .NewCT_NumDataSource ();};return MakeNumberDataSource (_ccgb ._feb .Val );};
|
|
|
|
|
|
|
|
// Index returns the index of the series
|
|
|
|
func (_cg LineChartSeries )Index ()uint32 {return _cg ._cce .Idx .ValAttr };
|
|
|
|
|
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_ffbc SurfaceChartSeries )SetIndex (idx uint32 ){_ffbc ._fdeg .Idx .ValAttr =idx };func (_cd ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cd ._dfdf .XVal ==nil {_cd ._dfdf .XVal =_bbdc .NewCT_AxDataSource ();};return MakeAxisDataSource (_cd ._dfdf .XVal );};type Marker struct{_daf *_bbdc .CT_Marker };func (_ecb SurfaceChartSeries )Values ()NumberDataSource {if _ecb ._fdeg .Val ==nil {_ecb ._fdeg .Val =_bbdc .NewCT_NumDataSource ();};_bdef :=MakeNumberDataSource (_ecb ._fdeg .Val );_bdef .CreateEmptyNumberCache ();return _bdef ;};func (_fa Legend )InitializeDefaults (){_fa .SetPosition (_bbdc .ST_LegendPosR );_fa .SetOverlay (false );_fa .Properties ().SetNoFill ();_fa .Properties ().LineProperties ().SetNoFill ();};func (_da DateAxis )SetCrosses (axis Axis ){_da ._ebd .CrossAx .ValAttr =axis .AxisID ()};func (_cgba CategoryAxis )SetTickLabelPosition (p _bbdc .ST_TickLblPos ){if p ==_bbdc .ST_TickLblPosUnset {_cgba ._dcbca .TickLblPos =nil ;}else {_cgba ._dcbca .TickLblPos =_bbdc .NewCT_TickLblPos ();_cgba ._dcbca .TickLblPos .ValAttr =p ;};};
|
|
|
|
|
|
|
|
// Values returns the value data source.
|
|
|
|
func (_ag BubbleChartSeries )Values ()NumberDataSource {if _ag ._dfa .YVal ==nil {_ag ._dfa .YVal =_bbdc .NewCT_NumDataSource ();};return MakeNumberDataSource (_ag ._dfa .YVal );};func (_gdb ValueAxis )SetMinorTickMark (m _bbdc .ST_TickMark ){if m ==_bbdc .ST_TickMarkUnset {_gdb ._ccde .MinorTickMark =nil ;}else {_gdb ._ccde .MinorTickMark =_bbdc .NewCT_TickMark ();_gdb ._ccde .MinorTickMark .ValAttr =m ;};};func (_dga CategoryAxis )SetPosition (p _bbdc .ST_AxPos ){_dga ._dcbca .AxPos =_bbdc .NewCT_AxPos ();_dga ._dcbca .AxPos .ValAttr =p ;};func MakeCategoryAxis (x *_bbdc .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
|
|
|
|
|
|
|
|
// SetText sets the series text.
|
|
|
|
func (_aea BarChartSeries )SetText (s string ){_aea ._bdbg .Tx =_bbdc .NewCT_SerTx ();_aea ._bdbg .Tx .Choice .V =&s ;};func (_bed Title )InitializeDefaults (){_bed .SetText ("\u0054\u0069\u0074l\u0065");_bed .RunProperties ().SetSize (16*_cdg .Point );_bed .RunProperties ().SetSolidFill (_gcd .Black );_bed .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_bed .RunProperties ().SetBold (false );};func (_gg ScatterChartSeries )InitializeDefaults (){_gg .Properties ().LineProperties ().SetNoFill ();_gg .Marker ().SetSymbol (_bbdc .ST_MarkerStyleAuto );_gg .Labels ().SetShowLegendKey (false );_gg .Labels ().SetShowValue (true );_gg .Labels ().SetShowPercent (false );_gg .Labels ().SetShowCategoryName (false );_gg .Labels ().SetShowSeriesName (false );_gg .Labels ().SetShowLeaderLines (false );};
|
|
|
|
|
|
|
|
// AddSeries adds a default series to a Scatter chart.
|
|
|
|
func (_cfb ScatterChart )AddSeries ()ScatterChartSeries {_gee :=_cfb .nextColor (len (_cfb ._bbe .Ser ));_dec :=_bbdc .NewCT_ScatterSer ();_cfb ._bbe .Ser =append (_cfb ._bbe .Ser ,_dec );_dec .Idx .ValAttr =uint32 (len (_cfb ._bbe .Ser )-1);_dec .Order .ValAttr =uint32 (len (_cfb ._bbe .Ser )-1);_dece :=ScatterChartSeries {_dec };_dece .InitializeDefaults ();_dece .Marker ().Properties ().LineProperties ().SetSolidFill (_gee );_dece .Marker ().Properties ().SetSolidFill (_gee );return _dece ;};func (_abcb Title )SetText (s string ){if _abcb ._dcb .Tx ==nil {_abcb ._dcb .Tx =_bbdc .NewCT_Tx ();};if _abcb ._dcb .Tx .Choice .Rich ==nil {_abcb ._dcb .Tx .Choice .Rich =_dge .NewCT_TextBody ();};var _beg *_dge .CT_TextParagraph ;if len (_abcb ._dcb .Tx .Choice .Rich .P )==0{_beg =_dge .NewCT_TextParagraph ();_abcb ._dcb .Tx .Choice .Rich .P =[]*_dge .CT_TextParagraph {_beg };}else {_beg =_abcb ._dcb .Tx .Choice .Rich .P [0];};var _cgeg *_dge .EG_TextRun ;if len (_beg .EG_TextRun )==0{_cgeg =_dge .NewEG_TextRun ();_beg .EG_TextRun =[]*_dge .EG_TextRun {_cgeg };}else {_cgeg =_beg .EG_TextRun [0];};if _cgeg .R ==nil {_cgeg .R =_dge .NewCT_RegularTextRun ();};_cgeg .R .T =s ;};
|
|
|
|
|
|
|
|
// AddDateAxis adds a value axis to the chart.
|
|
|
|
func (_dbf Chart )AddDateAxis ()DateAxis {_dgeg :=_bbdc .NewCT_DateAx ();if _dbf ._aaaf .Chart .PlotArea .CChoice ==nil {_dbf ._aaaf .Chart .PlotArea .CChoice =_bbdc .NewCT_PlotAreaChoice1 ();};_dgeg .AxId =_bbdc .NewCT_UnsignedInt ();_dgeg .AxId .ValAttr =0x7FFFFFFF&_gda .Uint32 ();_dbf ._aaaf .Chart .PlotArea .CChoice .DateAx =append (_dbf ._aaaf .Chart .PlotArea .CChoice .DateAx ,_dgeg );_dgeg .Delete =_bbdc .NewCT_Boolean ();_dgeg .Delete .ValAttr =_acb .Bool (false );_dgeg .Scaling =_bbdc .NewCT_Scaling ();_dgeg .Scaling .Orientation =_bbdc .NewCT_Orientation ();_dgeg .Scaling .Orientation .ValAttr =_bbdc .ST_OrientationMinMax ;_dgeg .Choice =&_bbdc .EG_AxSharedChoice {};_dgeg .Choice .Crosses =_bbdc .NewCT_Crosses ();_dgeg .Choice .Crosses .ValAttr =_bbdc .ST_CrossesAutoZero ;_cae :=DateAxis {_dgeg };_cae .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gcd .LightGray );_cae .SetMajorTickMark (_bbdc .ST_TickMarkOut );_cae .SetMinorTickMark (_bbdc .ST_TickMarkIn );_cae .SetTickLabelPosition (_bbdc .ST_TickLblPosNextTo );_cae .Properties ().LineProperties ().SetSolidFill (_gcd .Black );_cae .SetPosition (_bbdc .ST_AxPosL );return _cae ;};func (_cgd LineChartSeries )Values ()NumberDataSource {if _cgd ._cce .Val ==nil {_cgd ._cce .Val =_bbdc .NewCT_NumDataSource ();};return MakeNumberDataSource (_cgd ._cce .Val );};func (_daaf CategoryAxis )Properties ()_ba .ShapeProperties {if _daaf ._dcbca .SpPr ==nil {_daaf ._dcbca .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_daaf ._dcbca .SpPr );};
|
|
|
|
|
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_egf SurfaceChartSeries )Properties ()_ba .ShapeProperties {if _egf ._fdeg .SpPr ==nil {_egf ._fdeg .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_egf ._fdeg .SpPr );};
|
|
|
|
|
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_feg SurfaceChartSeries )SetOrder (idx uint32 ){_feg ._fdeg .Order .ValAttr =idx };
|
|
|
|
|
|
|
|
// AddSeries adds a default series to a Bubble chart.
|
|
|
|
func (_f BubbleChart )AddSeries ()BubbleChartSeries {_ccb :=_f .nextColor (len (_f ._ebf .Ser ));_geg :=_bbdc .NewCT_BubbleSer ();_f ._ebf .Ser =append (_f ._ebf .Ser ,_geg );_geg .Idx .ValAttr =uint32 (len (_f ._ebf .Ser )-1);_geg .Order .ValAttr =uint32 (len (_f ._ebf .Ser )-1);_deb :=BubbleChartSeries {_geg };_deb .InitializeDefaults ();_deb .Properties ().SetSolidFill (_ccb );return _deb ;};
|
|
|
|
|
|
|
|
// Area3DChart is an area chart that has a shaded area underneath a curve.
|
|
|
|
type Area3DChart struct{chartBase ;_cggb *_bbdc .CT_Area3DChart ;};
|
|
|
|
|
|
|
|
// Values returns the value data source.
|
|
|
|
func (_faa AreaChartSeries )Values ()NumberDataSource {if _faa ._ead .Val ==nil {_faa ._ead .Val =_bbdc .NewCT_NumDataSource ();};return MakeNumberDataSource (_faa ._ead .Val );};
|
|
|
|
|
|
|
|
// PieOfPieChart is a Pie chart with an extra Pie chart.
|
|
|
|
type PieOfPieChart struct{chartBase ;_bda *_bbdc .CT_OfPieChart ;};func (_eac SeriesAxis )SetCrosses (axis Axis ){_eac ._ffc .CrossAx .ValAttr =axis .AxisID ()};
|
|
|
|
|
|
|
|
// AddArea3DChart adds a new area chart to a chart.
|
|
|
|
func (_cgbce Chart )AddArea3DChart ()Area3DChart {_gfac (_cgbce ._aaaf .Chart );_ecd :=_bbdc .NewCT_PlotAreaChoice ();_cgbce ._aaaf .Chart .PlotArea .Choice =append (_cgbce ._aaaf .Chart .PlotArea .Choice ,_ecd );_ecd .Area3DChart =_bbdc .NewCT_Area3DChart ();_gac :=Area3DChart {_cggb :_ecd .Area3DChart };_gac .InitializeDefaults ();return _gac ;};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_efb SeriesAxis )X ()*_bbdc .CT_SerAx {return _efb ._ffc };
|
|
|
|
|
|
|
|
// Index returns the index of the series
|
|
|
|
func (_fgac SurfaceChartSeries )Index ()uint32 {return _fgac ._fdeg .Idx .ValAttr };
|
|
|
|
|
|
|
|
// Surface3DChart is a 3D view of a surface chart.
|
|
|
|
type Surface3DChart struct{chartBase ;_fdd *_bbdc .CT_Surface3DChart ;};
|
|
|
|
|
|
|
|
// AddSeries adds a default series to a bar chart.
|
|
|
|
func (_bagfc BarChart )AddSeries ()BarChartSeries {_ega :=_bagfc .nextColor (len (_bagfc ._aedb .Ser ));_ggd :=_bbdc .NewCT_BarSer ();_bagfc ._aedb .Ser =append (_bagfc ._aedb .Ser ,_ggd );_ggd .Idx .ValAttr =uint32 (len (_bagfc ._aedb .Ser )-1);_ggd .Order .ValAttr =uint32 (len (_bagfc ._aedb .Ser )-1);_ad :=BarChartSeries {_ggd };_ad .InitializeDefaults ();_ad .Properties ().SetSolidFill (_ega );return _ad ;};
|
|
|
|
|
|
|
|
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
|
|
|
|
func (_dfad DoughnutChart )SetHoleSize (pct uint8 ){if _dfad ._edf .HoleSize ==nil {_dfad ._edf .HoleSize =_bbdc .NewCT_HoleSize ();};if _dfad ._edf .HoleSize .ValAttr ==nil {_dfad ._edf .HoleSize .ValAttr =&_bbdc .ST_HoleSize {};};_dfad ._edf .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};func (_cggg SurfaceChartSeries )InitializeDefaults (){_cggg .Properties ().LineProperties ().SetWidth (1*_cdg .Point );_cggg .Properties ().LineProperties ().SetSolidFill (_gcd .Black );_cggg .Properties ().LineProperties ().SetJoin (_ba .LineJoinRound );};
|
|
|
|
|
|
|
|
// CreateEmptyNumberCache creates an empty number cache, which is used sometimes
|
|
|
|
// to increase file format compatibility. It should actually contain the
|
|
|
|
// computed cell data, but just creating an empty one is good enough.
|
|
|
|
func (_cag NumberDataSource )CreateEmptyNumberCache (){_cag .ensureChoice ();if _cag ._gab .Choice .NumRef ==nil {_cag ._gab .Choice .NumRef =_bbdc .NewCT_NumRef ();};_cag ._gab .Choice .NumLit =nil ;_cag ._gab .Choice .NumRef .NumCache =_bbdc .NewCT_NumData ();_cag ._gab .Choice .NumRef .NumCache .PtCount =_bbdc .NewCT_UnsignedInt ();_cag ._gab .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bg SurfaceChart )X ()*_bbdc .CT_SurfaceChart {return _bg ._cbfb };
|
|
|
|
|
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_afff ScatterChartSeries )SetIndex (idx uint32 ){_afff ._dfdf .Idx .ValAttr =idx };func (_adf ValueAxis )SetPosition (p _bbdc .ST_AxPos ){_adf ._ccde .AxPos =_bbdc .NewCT_AxPos ();_adf ._ccde .AxPos .ValAttr =p ;};func (_cgbc ScatterChartSeries )SetSmooth (b bool ){_cgbc ._dfdf .Smooth =_bbdc .NewCT_Boolean ();_cgbc ._dfdf .Smooth .ValAttr =&b ;};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_aaa Line3DChart )X ()*_bbdc .CT_Line3DChart {return _aaa ._eeb };
|
|
|
|
|
|
|
|
// AddSeries adds a default series to an area chart.
|
|
|
|
func (_eed Area3DChart )AddSeries ()AreaChartSeries {_gd :=_eed .nextColor (len (_eed ._cggb .Ser ));_aafb :=_bbdc .NewCT_AreaSer ();_eed ._cggb .Ser =append (_eed ._cggb .Ser ,_aafb );_aafb .Idx .ValAttr =uint32 (len (_eed ._cggb .Ser )-1);_aafb .Order .ValAttr =uint32 (len (_eed ._cggb .Ser )-1);_eec :=AreaChartSeries {_aafb };_eec .InitializeDefaults ();_eec .Properties ().SetSolidFill (_gd );return _eec ;};
|
|
|
|
|
|
|
|
// AddSeries adds a default series to an Pie3D chart.
|
|
|
|
func (_fc Pie3DChart )AddSeries ()PieChartSeries {_eda :=_bbdc .NewCT_PieSer ();_fc ._dcga .Ser =append (_fc ._dcga .Ser ,_eda );_eda .Idx .ValAttr =uint32 (len (_fc ._dcga .Ser )-1);_eda .Order .ValAttr =uint32 (len (_fc ._dcga .Ser )-1);_gae :=PieChartSeries {_eda };_gae .InitializeDefaults ();return _gae ;};func (_geae DateAxis )AxisID ()uint32 {return _geae ._ebd .AxId .ValAttr };
|
|
|
|
|
|
|
|
// SetType sets the type the secone pie to either pie or bar
|
|
|
|
func (_cf PieOfPieChart )SetType (t _bbdc .ST_OfPieType ){_cf ._bda .OfPieType .ValAttr =t };
|
|
|
|
|
|
|
|
// AddValueAxis adds a value axis to the chart.
|
|
|
|
func (_defc Chart )AddValueAxis ()ValueAxis {_baag :=_bbdc .NewCT_ValAx ();if _defc ._aaaf .Chart .PlotArea .CChoice ==nil {_defc ._aaaf .Chart .PlotArea .CChoice =_bbdc .NewCT_PlotAreaChoice1 ();};_baag .AxId =_bbdc .NewCT_UnsignedInt ();_baag .AxId .ValAttr =0x7FFFFFFF&_gda .Uint32 ();_defc ._aaaf .Chart .PlotArea .CChoice .ValAx =append (_defc ._aaaf .Chart .PlotArea .CChoice .ValAx ,_baag );_baag .Delete =_bbdc .NewCT_Boolean ();_baag .Delete .ValAttr =_acb .Bool (false );_baag .Scaling =_bbdc .NewCT_Scaling ();_baag .Scaling .Orientation =_bbdc .NewCT_Orientation ();_baag .Scaling .Orientation .ValAttr =_bbdc .ST_OrientationMinMax ;_baag .Choice =&_bbdc .EG_AxSharedChoice {};_baag .Choice .Crosses =_bbdc .NewCT_Crosses ();_baag .Choice .Crosses .ValAttr =_bbdc .ST_CrossesAutoZero ;_baag .CrossBetween =_bbdc .NewCT_CrossBetween ();_baag .CrossBetween .ValAttr =_bbdc .ST_CrossBetweenBetween ;_afd :=MakeValueAxis (_baag );_afd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gcd .LightGray );_afd .SetMajorTickMark (_bbdc .ST_TickMarkOut );_afd .SetMinorTickMark (_bbdc .ST_TickMarkIn );_afd .SetTickLabelPosition (_bbdc .ST_TickLblPosNextTo );_afd .Properties ().LineProperties ().SetSolidFill (_gcd .Black );_afd .SetPosition (_bbdc .ST_AxPosL );return _afd ;};func MakeDataLabels (x *_bbdc .CT_DLbls )DataLabels {return DataLabels {x }};type GridLines struct{_bf *_bbdc .CT_ChartLines };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_acd AreaChartSeries )X ()*_bbdc .CT_AreaSer {return _acd ._ead };func (_bffa NumberDataSource )SetReference (s string ){_bffa .ensureChoice ();if _bffa ._gab .Choice .NumRef ==nil {_bffa ._gab .Choice .NumRef =_bbdc .NewCT_NumRef ();};_bffa ._gab .Choice .NumRef .F =s ;};
|
|
|
|
|
|
|
|
// StockChart is a 2D Stock chart.
|
|
|
|
type StockChart struct{chartBase ;_dbc *_bbdc .CT_StockChart ;};type DataLabels struct{_eab *_bbdc .CT_DLbls };func MakeLegend (l *_bbdc .CT_Legend )Legend {return Legend {l }};
|
|
|
|
|
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_eba AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _eba ._ead .Cat ==nil {_eba ._ead .Cat =_bbdc .NewCT_AxDataSource ();};return MakeAxisDataSource (_eba ._ead .Cat );};
|
|
|
|
|
|
|
|
// AreaChartSeries is a series to be used on an area chart.
|
|
|
|
type AreaChartSeries struct{_ead *_bbdc .CT_AreaSer };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_gfc DateAxis )X ()*_bbdc .CT_DateAx {return _gfc ._ebd };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fbfc RadarChartSeries )X ()*_bbdc .CT_RadarSer {return _fbfc ._df };
|
|
|
|
|
|
|
|
// RadarChartSeries is a series to be used on an Radar chart.
|
|
|
|
type RadarChartSeries struct{_df *_bbdc .CT_RadarSer };
|
|
|
|
|
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_fcac PieChart )InitializeDefaults (){_fcac ._bbd .VaryColors =_bbdc .NewCT_Boolean ();_fcac ._bbd .VaryColors .ValAttr =_acb .Bool (true );};
|
|
|
|
|
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_bfe AreaChart )InitializeDefaults (){};
|
|
|
|
|
|
|
|
// AreaChart is an area chart that has a shaded area underneath a curve.
|
|
|
|
type AreaChart struct{chartBase ;_cc *_bbdc .CT_AreaChart ;};
|
|
|
|
|
|
|
|
// SetText sets the series text
|
|
|
|
func (_dbg SurfaceChartSeries )SetText (s string ){_dbg ._fdeg .Tx =_bbdc .NewCT_SerTx ();_dbg ._fdeg .Tx .Choice .V =&s ;};func (_aca ValueAxis )SetMajorTickMark (m _bbdc .ST_TickMark ){if m ==_bbdc .ST_TickMarkUnset {_aca ._ccde .MajorTickMark =nil ;}else {_aca ._ccde .MajorTickMark =_bbdc .NewCT_TickMark ();_aca ._ccde .MajorTickMark .ValAttr =m ;};};
|
|
|
|
|
|
|
|
// SetExplosion sets the value that the segements of the pie are 'exploded' by
|
|
|
|
func (_edaf PieChartSeries )SetExplosion (v uint32 ){_edaf ._feb .Explosion =_bbdc .NewCT_UnsignedInt ();_edaf ._feb .Explosion .ValAttr =v ;};
|
|
|
|
|
|
|
|
// SetLabelReference is used to set the source data to a range of cells
|
|
|
|
// containing strings.
|
|
|
|
func (_dee CategoryAxisDataSource )SetLabelReference (s string ){_dee ._bdaf .Choice =_bbdc .NewCT_AxDataSourceChoice ();_dee ._bdaf .Choice .StrRef =_bbdc .NewCT_StrRef ();_dee ._bdaf .Choice .StrRef .F =s ;};
|
|
|
|
|
|
|
|
// Values returns the value data source.
|
|
|
|
func (_ec BarChartSeries )Values ()NumberDataSource {if _ec ._bdbg .Val ==nil {_ec ._bdbg .Val =_bbdc .NewCT_NumDataSource ();};return MakeNumberDataSource (_ec ._bdbg .Val );};func (_fabf Legend )SetOverlay (b bool ){_fabf ._aag .Overlay =_bbdc .NewCT_Boolean ();_fabf ._aag .Overlay .ValAttr =_acb .Bool (b );};var _cbd =[]_gcd .Color {_gcd .RGB (0x33,0x66,0xcc),_gcd .RGB (0xDC,0x39,0x12),_gcd .RGB (0xFF,0x99,0x00),_gcd .RGB (0x10,0x96,0x18),_gcd .RGB (0x99,0x00,0x99),_gcd .RGB (0x3B,0x3E,0xAC),_gcd .RGB (0x00,0x99,0xC6),_gcd .RGB (0xDD,0x44,0x77),_gcd .RGB (0x66,0xAA,0x00),_gcd .RGB (0xB8,0x2E,0x2E),_gcd .RGB (0x31,0x63,0x95),_gcd .RGB (0x99,0x44,0x99),_gcd .RGB (0x22,0xAA,0x99),_gcd .RGB (0xAA,0xAA,0x11),_gcd .RGB (0x66,0x33,0xCC),_gcd .RGB (0xE6,0x73,0x00),_gcd .RGB (0x8B,0x07,0x07),_gcd .RGB (0x32,0x92,0x62),_gcd .RGB (0x55,0x74,0xA6),_gcd .RGB (0x3B,0x3E,0xAC)};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fd RadarChart )X ()*_bbdc .CT_RadarChart {return _fd ._gcfb };
|
|
|
|
|
|
|
|
// ScatterChartSeries is the data series for a scatter chart.
|
|
|
|
type ScatterChartSeries struct{_dfdf *_bbdc .CT_ScatterSer };
|
|
|
|
|
|
|
|
// DoughnutChart is a Doughnut chart.
|
|
|
|
type DoughnutChart struct{chartBase ;_edf *_bbdc .CT_DoughnutChart ;};
|
|
|
|
|
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_cdbg AreaChartSeries )Properties ()_ba .ShapeProperties {if _cdbg ._ead .SpPr ==nil {_cdbg ._ead .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_cdbg ._ead .SpPr );};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
|
|
|
// AddLegend adds a legend to a chart, replacing any existing legend.
|
2020-08-23 14:15:53 +00:00
|
|
|
func (_dafc Chart )AddLegend ()Legend {_dafc ._aaaf .Chart .Legend =_bbdc .NewCT_Legend ();_e :=MakeLegend (_dafc ._aaaf .Chart .Legend );_e .InitializeDefaults ();return _e ;};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_aaed LineChartSeries )SetOrder (idx uint32 ){_aaed ._cce .Order .ValAttr =idx };
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bd ValueAxis )X ()*_bbdc .CT_ValAx {return _bd ._ccde };
|
|
|
|
|
|
|
|
// SurfaceChart is a 3D surface chart, viewed from the top-down.
|
|
|
|
type SurfaceChart struct{chartBase ;_cbfb *_bbdc .CT_SurfaceChart ;};
|
|
|
|
|
|
|
|
// Values returns the bubble size data source.
|
|
|
|
func (_cbf BubbleChartSeries )BubbleSizes ()NumberDataSource {if _cbf ._dfa .BubbleSize ==nil {_cbf ._dfa .BubbleSize =_bbdc .NewCT_NumDataSource ();};return MakeNumberDataSource (_cbf ._dfa .BubbleSize );};type Legend struct{_aag *_bbdc .CT_Legend };type chartBase struct{};func (_dea GridLines )Properties ()_ba .ShapeProperties {if _dea ._bf .SpPr ==nil {_dea ._bf .SpPr =_dge .NewCT_ShapeProperties ();};return _ba .MakeShapeProperties (_dea ._bf .SpPr );};
|
|
|
|
|
|
|
|
// AddAxis adds an axis to a line chart.
|
|
|
|
func (_fbe LineChart )AddAxis (axis Axis ){_bc :=_bbdc .NewCT_UnsignedInt ();_bc .ValAttr =axis .AxisID ();_fbe ._bbg .AxId =append (_fbe ._bbg .AxId ,_bc );};
|