unioffice/chart/chart.go

531 lines
58 KiB
Go
Raw Normal View History

//
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/
2020-10-12 13:59:12 +00:00
package chart ;import (_e "fmt";_c "github.com/unidoc/unioffice";_gd "github.com/unidoc/unioffice/color";_cg "github.com/unidoc/unioffice/drawing";_a "github.com/unidoc/unioffice/measurement";_ea "github.com/unidoc/unioffice/schema/soo/dml";_gf "github.com/unidoc/unioffice/schema/soo/dml/chart";_d "math/rand";);
2020-10-12 13:59:12 +00:00
// AddDateAxis adds a value axis to the chart.
func (_gbc Chart )AddDateAxis ()DateAxis {_afa :=_gf .NewCT_DateAx ();if _gbc ._ed .Chart .PlotArea .CChoice ==nil {_gbc ._ed .Chart .PlotArea .CChoice =_gf .NewCT_PlotAreaChoice1 ();};_afa .AxId =_gf .NewCT_UnsignedInt ();_afa .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_gbc ._ed .Chart .PlotArea .CChoice .DateAx =append (_gbc ._ed .Chart .PlotArea .CChoice .DateAx ,_afa );_afa .Delete =_gf .NewCT_Boolean ();_afa .Delete .ValAttr =_c .Bool (false );_afa .Scaling =_gf .NewCT_Scaling ();_afa .Scaling .Orientation =_gf .NewCT_Orientation ();_afa .Scaling .Orientation .ValAttr =_gf .ST_OrientationMinMax ;_afa .Choice =&_gf .EG_AxSharedChoice {};_afa .Choice .Crosses =_gf .NewCT_Crosses ();_afa .Choice .Crosses .ValAttr =_gf .ST_CrossesAutoZero ;_ddg :=DateAxis {_afa };_ddg .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gd .LightGray );_ddg .SetMajorTickMark (_gf .ST_TickMarkOut );_ddg .SetMinorTickMark (_gf .ST_TickMarkIn );_ddg .SetTickLabelPosition (_gf .ST_TickLblPosNextTo );_ddg .Properties ().LineProperties ().SetSolidFill (_gd .Black );_ddg .SetPosition (_gf .ST_AxPosL );return _ddg ;};
2020-10-12 13:59:12 +00:00
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_acb BubbleChartSeries )InitializeDefaults (){};
2020-10-12 13:59:12 +00:00
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
func (_bfe CategoryAxisDataSource )SetLabelReference (s string ){_bfe ._faag .Choice =_gf .NewCT_AxDataSourceChoice ();_bfe ._faag .Choice .StrRef =_gf .NewCT_StrRef ();_bfe ._faag .Choice .StrRef .F =s ;};func (_effb SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _effb ._ada .Cat ==nil {_effb ._ada .Cat =_gf .NewCT_AxDataSource ();};return MakeAxisDataSource (_effb ._ada .Cat );};func MakeDataLabels (x *_gf .CT_DLbls )DataLabels {return DataLabels {x }};
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// RemoveLegend removes the legend if the chart has one.
func (_gff Chart )RemoveLegend (){_gff ._ed .Chart .Legend =nil };
2020-10-12 13:59:12 +00:00
// AddArea3DChart adds a new area chart to a chart.
func (_edc Chart )AddArea3DChart ()Area3DChart {_bff (_edc ._ed .Chart );_cdd :=_gf .NewCT_PlotAreaChoice ();_edc ._ed .Chart .PlotArea .Choice =append (_edc ._ed .Chart .PlotArea .Choice ,_cdd );_cdd .Area3DChart =_gf .NewCT_Area3DChart ();_afg :=Area3DChart {_b :_cdd .Area3DChart };_afg .InitializeDefaults ();return _afg ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the line chart series shape properties.
func (_fcad ScatterChartSeries )Properties ()_cg .ShapeProperties {if _fcad ._bagba .SpPr ==nil {_fcad ._bagba .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_fcad ._bagba .SpPr );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Index returns the index of the series
func (_fbg ScatterChartSeries )Index ()uint32 {return _fbg ._bagba .Idx .ValAttr };
2020-10-12 13:59:12 +00:00
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_fgb *_gf .CT_Pie3DChart ;};
2020-10-12 13:59:12 +00:00
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_bae *_gf .CT_PieSer };
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_cc AreaChartSeries )X ()*_gf .CT_AreaSer {return _cc ._bf };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the bar chart series shape properties.
func (_fc BarChartSeries )Properties ()_cg .ShapeProperties {if _fc ._bcc .SpPr ==nil {_fc ._bcc .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_fc ._bcc .SpPr );};func (_bagb ScatterChart )InitializeDefaults (){_bagb ._beba .ScatterStyle .ValAttr =_gf .ST_ScatterStyleMarker ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_cbd Chart )AddDoughnutChart ()DoughnutChart {_dea :=_gf .NewCT_PlotAreaChoice ();_cbd ._ed .Chart .PlotArea .Choice =append (_cbd ._ed .Chart .PlotArea .Choice ,_dea );_dea .DoughnutChart =_gf .NewCT_DoughnutChart ();_abc :=DoughnutChart {_eff :_dea .DoughnutChart };_abc .InitializeDefaults ();return _abc ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the chart's shape properties.
func (_ccf Chart )Properties ()_cg .ShapeProperties {if _ccf ._ed .SpPr ==nil {_ccf ._ed .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_ccf ._ed .SpPr );};var _bge =[]_gd .Color {_gd .RGB (0x33,0x66,0xcc),_gd .RGB (0xDC,0x39,0x12),_gd .RGB (0xFF,0x99,0x00),_gd .RGB (0x10,0x96,0x18),_gd .RGB (0x99,0x00,0x99),_gd .RGB (0x3B,0x3E,0xAC),_gd .RGB (0x00,0x99,0xC6),_gd .RGB (0xDD,0x44,0x77),_gd .RGB (0x66,0xAA,0x00),_gd .RGB (0xB8,0x2E,0x2E),_gd .RGB (0x31,0x63,0x95),_gd .RGB (0x99,0x44,0x99),_gd .RGB (0x22,0xAA,0x99),_gd .RGB (0xAA,0xAA,0x11),_gd .RGB (0x66,0x33,0xCC),_gd .RGB (0xE6,0x73,0x00),_gd .RGB (0x8B,0x07,0x07),_gd .RGB (0x32,0x92,0x62),_gd .RGB (0x55,0x74,0xA6),_gd .RGB (0x3B,0x3E,0xAC)};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults the bar chart to its defaults
func (_cca DoughnutChart )InitializeDefaults (){_cca ._eff .VaryColors =_gf .NewCT_Boolean ();_cca ._eff .VaryColors .ValAttr =_c .Bool (true );_cca ._eff .HoleSize =_gf .NewCT_HoleSize ();_cca ._eff .HoleSize .ValAttr =&_gf .ST_HoleSize {};_cca ._eff .HoleSize .ValAttr .ST_HoleSizeUByte =_c .Uint8 (50);};
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_eef Marker )X ()*_gf .CT_Marker {return _eef ._aegc };func (_bgdf ValueAxis )SetPosition (p _gf .ST_AxPos ){_bgdf ._ggbc .AxPos =_gf .NewCT_AxPos ();_bgdf ._ggbc .AxPos .ValAttr =p ;};func (_fag ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fag ._bagba .XVal ==nil {_fag ._bagba .XVal =_gf .NewCT_AxDataSource ();};return MakeAxisDataSource (_fag ._bagba .XVal );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Labels returns the data label properties.
func (_bggf ScatterChartSeries )Labels ()DataLabels {if _bggf ._bagba .DLbls ==nil {_bggf ._bagba .DLbls =_gf .NewCT_DLbls ();};return MakeDataLabels (_bggf ._bagba .DLbls );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_fff StockChart )X ()*_gf .CT_StockChart {return _fff ._bfeb };func MakeChart (x *_gf .ChartSpace )Chart {return Chart {x }};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_fbc RadarChartSeries )X ()*_gf .CT_RadarSer {return _fbc ._eebe };func (_ebfc Marker )Properties ()_cg .ShapeProperties {if _ebfc ._aegc .SpPr ==nil {_ebfc ._aegc .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_ebfc ._aegc .SpPr );};func _bff (_ggd *_gf .CT_Chart ){_ggd .View3D =_gf .NewCT_View3D ();_ggd .View3D .RotX =_gf .NewCT_RotX ();_ggd .View3D .RotX .ValAttr =_c .Int8 (15);_ggd .View3D .RotY =_gf .NewCT_RotY ();_ggd .View3D .RotY .ValAttr =_c .Uint16 (20);_ggd .View3D .RAngAx =_gf .NewCT_Boolean ();_ggd .View3D .RAngAx .ValAttr =_c .Bool (false );_ggd .Floor =_gf .NewCT_Surface ();_ggd .Floor .Thickness =_gf .NewCT_Thickness ();_ggd .Floor .Thickness .ValAttr .Uint32 =_c .Uint32 (0);_ggd .SideWall =_gf .NewCT_Surface ();_ggd .SideWall .Thickness =_gf .NewCT_Thickness ();_ggd .SideWall .Thickness .ValAttr .Uint32 =_c .Uint32 (0);_ggd .BackWall =_gf .NewCT_Surface ();_ggd .BackWall .Thickness =_gf .NewCT_Thickness ();_ggd .BackWall .Thickness .ValAttr .Uint32 =_c .Uint32 (0);};
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// SetText sets the series text.
2020-10-12 13:59:12 +00:00
func (_ged BarChartSeries )SetText (s string ){_ged ._bcc .Tx =_gf .NewCT_SerTx ();_ged ._bcc .Tx .Choice .V =&s ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_cdbc *_gf .CT_PieChart ;};
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_eabg Surface3DChart )X ()*_gf .CT_Surface3DChart {return _eabg ._acae };func (_bga Title )SetText (s string ){if _bga ._dbgg .Tx ==nil {_bga ._dbgg .Tx =_gf .NewCT_Tx ();};if _bga ._dbgg .Tx .Choice .Rich ==nil {_bga ._dbgg .Tx .Choice .Rich =_ea .NewCT_TextBody ();};var _ccee *_ea .CT_TextParagraph ;if len (_bga ._dbgg .Tx .Choice .Rich .P )==0{_ccee =_ea .NewCT_TextParagraph ();_bga ._dbgg .Tx .Choice .Rich .P =[]*_ea .CT_TextParagraph {_ccee };}else {_ccee =_bga ._dbgg .Tx .Choice .Rich .P [0];};var _gbff *_ea .EG_TextRun ;if len (_ccee .EG_TextRun )==0{_gbff =_ea .NewEG_TextRun ();_ccee .EG_TextRun =[]*_ea .EG_TextRun {_gbff };}else {_gbff =_ccee .EG_TextRun [0];};if _gbff .R ==nil {_gbff .R =_ea .NewCT_RegularTextRun ();};_gbff .R .T =s ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_fd Chart )AddSurface3DChart ()Surface3DChart {_fdd :=_gf .NewCT_PlotAreaChoice ();_fd ._ed .Chart .PlotArea .Choice =append (_fd ._ed .Chart .PlotArea .Choice ,_fdd );_fdd .Surface3DChart =_gf .NewCT_Surface3DChart ();_bff (_fd ._ed .Chart );_ccba :=Surface3DChart {_acae :_fdd .Surface3DChart };_ccba .InitializeDefaults ();return _ccba ;};func (_gcg Surface3DChart )InitializeDefaults (){_gcg ._acae .Wireframe =_gf .NewCT_Boolean ();_gcg ._acae .Wireframe .ValAttr =_c .Bool (false );_gcg ._acae .BandFmts =_gf .NewCT_BandFmts ();for _aacb :=0;_aacb < 15;_aacb ++{_eggf :=_gf .NewCT_BandFmt ();_eggf .Idx .ValAttr =uint32 (_aacb );_eggf .SpPr =_ea .NewCT_ShapeProperties ();_gad :=_cg .MakeShapeProperties (_eggf .SpPr );_gad .SetSolidFill (_gcg .nextColor (_aacb ));_gcg ._acae .BandFmts .BandFmt =append (_gcg ._acae .BandFmts .BandFmt ,_eggf );};};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_fad *_gf .CT_BubbleChart ;};
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// Chart is a generic chart.
type Chart struct{_ed *_gf .ChartSpace };func (_gdd DataLabels )SetShowPercent (b bool ){_gdd .ensureChoice ();_gdd ._bdd .Choice .ShowPercent =_gf .NewCT_Boolean ();_gdd ._bdd .Choice .ShowPercent .ValAttr =_c .Bool (b );};
// InitializeDefaults the Bubble chart to its defaults
func (_aga BubbleChart )InitializeDefaults (){};func (_fdfd ValueAxis )MajorGridLines ()GridLines {if _fdfd ._ggbc .MajorGridlines ==nil {_fdfd ._ggbc .MajorGridlines =_gf .NewCT_ChartLines ();};return GridLines {_fdfd ._ggbc .MajorGridlines };};func (_gba DataLabels )SetShowCategoryName (b bool ){_gba .ensureChoice ();_gba ._bdd .Choice .ShowCatName =_gf .NewCT_Boolean ();_gba ._bdd .Choice .ShowCatName .ValAttr =_c .Bool (b );};
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_gf .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};func (_bcfc GridLines )Properties ()_cg .ShapeProperties {if _bcfc ._ggg .SpPr ==nil {_bcfc ._ggg .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_bcfc ._ggg .SpPr );};
// AddSeries adds a default series to a bar chart.
func (_eae Bar3DChart )AddSeries ()BarChartSeries {_bcb :=_eae .nextColor (len (_eae ._ccg .Ser ));_dd :=_gf .NewCT_BarSer ();_eae ._ccg .Ser =append (_eae ._ccg .Ser ,_dd );_dd .Idx .ValAttr =uint32 (len (_eae ._ccg .Ser )-1);_dd .Order .ValAttr =uint32 (len (_eae ._ccg .Ser )-1);_gag :=BarChartSeries {_dd };_gag .InitializeDefaults ();_gag .Properties ().SetSolidFill (_bcb );return _gag ;};func (_geb ValueAxis )SetTickLabelPosition (p _gf .ST_TickLblPos ){if p ==_gf .ST_TickLblPosUnset {_geb ._ggbc .TickLblPos =nil ;}else {_geb ._ggbc .TickLblPos =_gf .NewCT_TickLblPos ();_geb ._ggbc .TickLblPos .ValAttr =p ;};};
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_dcd DateAxis )X ()*_gf .CT_DateAx {return _dcd ._aac };
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_bbed SurfaceChartSeries )X ()*_gf .CT_SurfaceSer {return _bbed ._ada };
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_aeff SeriesAxis )X ()*_gf .CT_SerAx {return _aeff ._fec };type LineChart struct{chartBase ;_ebbc *_gf .CT_LineChart ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_eeg SurfaceChart )X ()*_gf .CT_SurfaceChart {return _eeg ._gfaa };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the bar chart series shape properties.
func (_ebc RadarChartSeries )Properties ()_cg .ShapeProperties {if _ebc ._eebe .SpPr ==nil {_ebc ._eebe .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_ebc ._eebe .SpPr );};func MakeMarker (x *_gf .CT_Marker )Marker {return Marker {x }};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults the bar chart to its defaults
func (_eaee PieChart )InitializeDefaults (){_eaee ._cdbc .VaryColors =_gf .NewCT_Boolean ();_eaee ._cdbc .VaryColors .ValAttr =_c .Bool (true );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetIndex sets the index of the series
func (_feg SurfaceChartSeries )SetIndex (idx uint32 ){_feg ._ada .Idx .ValAttr =idx };func (_fce BubbleChart )AddAxis (axis Axis ){_ceb :=_gf .NewCT_UnsignedInt ();_ceb .ValAttr =axis .AxisID ();_fce ._fad .AxId =append (_fce ._fad .AxId ,_ceb );};func (_da CategoryAxis )SetMajorTickMark (m _gf .ST_TickMark ){if m ==_gf .ST_TickMarkUnset {_da ._eaf .MajorTickMark =nil ;}else {_da ._eaf .MajorTickMark =_gf .NewCT_TickMark ();_da ._eaf .MajorTickMark .ValAttr =m ;};};
2017-09-05 20:20:00 -04:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to an Pie chart.
func (_fae PieOfPieChart )AddSeries ()PieChartSeries {_dfd :=_gf .NewCT_PieSer ();_fae ._dcgc .Ser =append (_fae ._dcgc .Ser ,_dfd );_dfd .Idx .ValAttr =uint32 (len (_fae ._dcgc .Ser )-1);_dfd .Order .ValAttr =uint32 (len (_fae ._dcgc .Ser )-1);_ccgd :=PieChartSeries {_dfd };_ccgd .InitializeDefaults ();return _ccgd ;};
2017-09-07 12:08:13 -04:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to a line chart.
func (_eaba Line3DChart )AddSeries ()LineChartSeries {_gdc :=_eaba .nextColor (len (_eaba ._cdg .Ser ));_ege :=_gf .NewCT_LineSer ();_eaba ._cdg .Ser =append (_eaba ._cdg .Ser ,_ege );_ege .Idx .ValAttr =uint32 (len (_eaba ._cdg .Ser )-1);_ege .Order .ValAttr =uint32 (len (_eaba ._cdg .Ser )-1);_bbg :=LineChartSeries {_ege };_bbg .InitializeDefaults ();_bbg .Properties ().LineProperties ().SetSolidFill (_gdc );_bbg .Properties ().SetSolidFill (_gdc );return _bbg ;};func MakeLegend (l *_gf .CT_Legend )Legend {return Legend {l }};
2017-09-07 12:08:13 -04:00
2020-10-12 13:59:12 +00:00
// AddScatterChart adds a scatter (X/Y) chart.
func (_aeg Chart )AddScatterChart ()ScatterChart {_ff :=_gf .NewCT_PlotAreaChoice ();_aeg ._ed .Chart .PlotArea .Choice =append (_aeg ._ed .Chart .PlotArea .Choice ,_ff );_ff .ScatterChart =_gf .NewCT_ScatterChart ();_feed :=ScatterChart {_beba :_ff .ScatterChart };_feed .InitializeDefaults ();return _feed ;};
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_af Area3DChart )X ()*_gf .CT_Area3DChart {return _af ._b };
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to an Doughnut chart.
func (_ccbb DoughnutChart )AddSeries ()PieChartSeries {_bfg :=_gf .NewCT_PieSer ();_ccbb ._eff .Ser =append (_ccbb ._eff .Ser ,_bfg );_bfg .Idx .ValAttr =uint32 (len (_ccbb ._eff .Ser )-1);_bfg .Order .ValAttr =uint32 (len (_ccbb ._eff .Ser )-1);_aca :=PieChartSeries {_bfg };_aca .InitializeDefaults ();return _aca ;};func MakeCategoryAxis (x *_gf .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
2017-09-06 17:02:21 -04:00
2020-10-12 13:59:12 +00:00
// SetOrder sets the order of the series
func (_gbcf ScatterChartSeries )SetOrder (idx uint32 ){_gbcf ._bagba .Order .ValAttr =idx };
2017-09-06 17:02:21 -04:00
2020-10-12 13:59:12 +00:00
// AddTitle sets a new title on the chart.
func (_edf Chart )AddTitle ()Title {_edf ._ed .Chart .Title =_gf .NewCT_Title ();_edf ._ed .Chart .Title .Overlay =_gf .NewCT_Boolean ();_edf ._ed .Chart .Title .Overlay .ValAttr =_c .Bool (false );_edf ._ed .Chart .AutoTitleDeleted =_gf .NewCT_Boolean ();_edf ._ed .Chart .AutoTitleDeleted .ValAttr =_c .Bool (false );_gcb :=MakeTitle (_edf ._ed .Chart .Title );_gcb .InitializeDefaults ();return _gcb ;};
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_agc BarChart )X ()*_gf .CT_BarChart {return _agc ._fg };
2017-09-06 17:24:30 -04:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_gbdd GridLines )X ()*_gf .CT_ChartLines {return _gbdd ._ggg };type ValueAxis struct{_ggbc *_gf .CT_ValAx };
2017-09-06 17:24:30 -04:00
2020-10-12 13:59:12 +00:00
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_fa *_gf .CT_AreaChart ;};
2017-09-06 17:33:34 -04:00
2020-10-12 13:59:12 +00:00
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_bagba *_gf .CT_ScatterSer };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to a Surface chart.
func (_ebeg SurfaceChart )AddSeries ()SurfaceChartSeries {_gcbf :=_ebeg .nextColor (len (_ebeg ._gfaa .Ser ));_dde :=_gf .NewCT_SurfaceSer ();_ebeg ._gfaa .Ser =append (_ebeg ._gfaa .Ser ,_dde );_dde .Idx .ValAttr =uint32 (len (_ebeg ._gfaa .Ser )-1);_dde .Order .ValAttr =uint32 (len (_ebeg ._gfaa .Ser )-1);_bcbe :=SurfaceChartSeries {_dde };_bcbe .InitializeDefaults ();_bcbe .Properties ().LineProperties ().SetSolidFill (_gcbf );return _bcbe ;};func (_bdb CategoryAxis )SetTickLabelPosition (p _gf .ST_TickLblPos ){if p ==_gf .ST_TickLblPosUnset {_bdb ._eaf .TickLblPos =nil ;}else {_bdb ._eaf .TickLblPos =_gf .NewCT_TickLblPos ();_bdb ._eaf .TickLblPos .ValAttr =p ;};};
2017-09-06 17:33:34 -04:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to an Radar chart.
func (_gef RadarChart )AddSeries ()RadarChartSeries {_bcce :=_gef .nextColor (len (_gef ._gee .Ser ));_dad :=_gf .NewCT_RadarSer ();_gef ._gee .Ser =append (_gef ._gee .Ser ,_dad );_dad .Idx .ValAttr =uint32 (len (_gef ._gee .Ser )-1);_dad .Order .ValAttr =uint32 (len (_gef ._gee .Ser )-1);_cdab :=RadarChartSeries {_dad };_cdab .InitializeDefaults ();_cdab .Properties ().SetSolidFill (_bcce );return _cdab ;};
2017-09-06 17:36:49 -04:00
2020-08-31 22:58:25 +00:00
// InitializeDefaults the bar chart to its defaults
2020-10-12 13:59:12 +00:00
func (_gb Area3DChart )InitializeDefaults (){};func (_gea LineChartSeries )Values ()NumberDataSource {if _gea ._dcea .Val ==nil {_gea ._dcea .Val =_gf .NewCT_NumDataSource ();};return MakeNumberDataSource (_gea ._dcea .Val );};
2017-09-06 17:36:49 -04:00
2020-10-12 13:59:12 +00:00
// Order returns the order of the series
func (_deg LineChartSeries )Order ()uint32 {return _deg ._dcea .Order .ValAttr };func (_daa Legend )Properties ()_cg .ShapeProperties {if _daa ._adc .SpPr ==nil {_daa ._adc .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_daa ._adc .SpPr );};func (_abb DateAxis )SetCrosses (axis Axis ){_abb ._aac .CrossAx .ValAttr =axis .AxisID ()};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_caf Chart )AddLegend ()Legend {_caf ._ed .Chart .Legend =_gf .NewCT_Legend ();_age :=MakeLegend (_caf ._ed .Chart .Legend );_age .InitializeDefaults ();return _age ;};func (_gbb DataLabels )SetShowLegendKey (b bool ){_gbb .ensureChoice ();_gbb ._bdd .Choice .ShowLegendKey =_gf .NewCT_Boolean ();_gbb ._bdd .Choice .ShowLegendKey .ValAttr =_c .Bool (b );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// 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 (_bgd NumberDataSource )CreateEmptyNumberCache (){_bgd .ensureChoice ();if _bgd ._efe .Choice .NumRef ==nil {_bgd ._efe .Choice .NumRef =_gf .NewCT_NumRef ();};_bgd ._efe .Choice .NumLit =nil ;_bgd ._efe .Choice .NumRef .NumCache =_gf .NewCT_NumData ();_bgd ._efe .Choice .NumRef .NumCache .PtCount =_gf .NewCT_UnsignedInt ();_bgd ._efe .Choice .NumRef .NumCache .PtCount .ValAttr =0;};type DataLabels struct{_bdd *_gf .CT_DLbls };
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_ggdf Title )X ()*_gf .CT_Title {return _ggdf ._dbgg };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddValueAxis adds a value axis to the chart.
func (_gga Chart )AddValueAxis ()ValueAxis {_gac :=_gf .NewCT_ValAx ();if _gga ._ed .Chart .PlotArea .CChoice ==nil {_gga ._ed .Chart .PlotArea .CChoice =_gf .NewCT_PlotAreaChoice1 ();};_gac .AxId =_gf .NewCT_UnsignedInt ();_gac .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_gga ._ed .Chart .PlotArea .CChoice .ValAx =append (_gga ._ed .Chart .PlotArea .CChoice .ValAx ,_gac );_gac .Delete =_gf .NewCT_Boolean ();_gac .Delete .ValAttr =_c .Bool (false );_gac .Scaling =_gf .NewCT_Scaling ();_gac .Scaling .Orientation =_gf .NewCT_Orientation ();_gac .Scaling .Orientation .ValAttr =_gf .ST_OrientationMinMax ;_gac .Choice =&_gf .EG_AxSharedChoice {};_gac .Choice .Crosses =_gf .NewCT_Crosses ();_gac .Choice .Crosses .ValAttr =_gf .ST_CrossesAutoZero ;_gac .CrossBetween =_gf .NewCT_CrossBetween ();_gac .CrossBetween .ValAttr =_gf .ST_CrossBetweenBetween ;_cgbe :=MakeValueAxis (_gac );_cgbe .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gd .LightGray );_cgbe .SetMajorTickMark (_gf .ST_TickMarkOut );_cgbe .SetMinorTickMark (_gf .ST_TickMarkIn );_cgbe .SetTickLabelPosition (_gf .ST_TickLblPosNextTo );_cgbe .Properties ().LineProperties ().SetSolidFill (_gd .Black );_cgbe .SetPosition (_gf .ST_AxPosL );return _cgbe ;};
2020-10-12 13:59:12 +00:00
// Values returns the value data source.
func (_ebb BarChartSeries )Values ()NumberDataSource {if _ebb ._bcc .Val ==nil {_ebb ._bcc .Val =_gf .NewCT_NumDataSource ();};return MakeNumberDataSource (_ebb ._bcc .Val );};
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to a Scatter chart.
func (_aaf ScatterChart )AddSeries ()ScatterChartSeries {_decg :=_aaf .nextColor (len (_aaf ._beba .Ser ));_dcfa :=_gf .NewCT_ScatterSer ();_aaf ._beba .Ser =append (_aaf ._beba .Ser ,_dcfa );_dcfa .Idx .ValAttr =uint32 (len (_aaf ._beba .Ser )-1);_dcfa .Order .ValAttr =uint32 (len (_aaf ._beba .Ser )-1);_fdbc :=ScatterChartSeries {_dcfa };_fdbc .InitializeDefaults ();_fdbc .Marker ().Properties ().LineProperties ().SetSolidFill (_decg );_fdbc .Marker ().Properties ().SetSolidFill (_decg );return _fdbc ;};
2020-10-12 13:59:12 +00:00
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_acae *_gf .CT_Surface3DChart ;};
2020-08-31 22:58:25 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_eec Legend )X ()*_gf .CT_Legend {return _eec ._adc };type Marker struct{_aegc *_gf .CT_Marker };
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to a Stock chart.
func (_gbfc StockChart )AddSeries ()LineChartSeries {_cdgg :=_gf .NewCT_LineSer ();_gbfc ._bfeb .Ser =append (_gbfc ._bfeb .Ser ,_cdgg );_cdgg .Idx .ValAttr =uint32 (len (_gbfc ._bfeb .Ser )-1);_cdgg .Order .ValAttr =uint32 (len (_gbfc ._bfeb .Ser )-1);_gage :=LineChartSeries {_cdgg };_gage .Values ().CreateEmptyNumberCache ();_gage .Properties ().LineProperties ().SetNoFill ();return _gage ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddAxis adds an axis to a line chart.
func (_geg Line3DChart )AddAxis (axis Axis ){_fdb :=_gf .NewCT_UnsignedInt ();_fdb .ValAttr =axis .AxisID ();_geg ._cdg .AxId =append (_geg ._cdg .AxId ,_fdb );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_cae PieChartSeries )X ()*_gf .CT_PieSer {return _cae ._bae };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetOrder sets the order of the series
func (_fege SurfaceChartSeries )SetOrder (idx uint32 ){_fege ._ada .Order .ValAttr =idx };func (_fea CategoryAxis )AxisID ()uint32 {return _fea ._eaf .AxId .ValAttr };
2020-10-12 13:59:12 +00:00
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_fg *_gf .CT_BarChart ;};
2020-10-12 13:59:12 +00:00
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_acca DoughnutChart )SetHoleSize (pct uint8 ){if _acca ._eff .HoleSize ==nil {_acca ._eff .HoleSize =_gf .NewCT_HoleSize ();};if _acca ._eff .HoleSize .ValAttr ==nil {_acca ._eff .HoleSize .ValAttr =&_gf .ST_HoleSize {};};_acca ._eff .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_fgg BubbleChartSeries )X ()*_gf .CT_BubbleSer {return _fgg ._ca };
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_afab Pie3DChart )X ()*_gf .CT_Pie3DChart {return _afab ._fgb };
2020-10-12 13:59:12 +00:00
// AddPieChart adds a new pie chart to a chart.
func (_bda Chart )AddPieChart ()PieChart {_cfg :=_gf .NewCT_PlotAreaChoice ();_bda ._ed .Chart .PlotArea .Choice =append (_bda ._ed .Chart .PlotArea .Choice ,_cfg );_cfg .PieChart =_gf .NewCT_PieChart ();_aef :=PieChart {_cdbc :_cfg .PieChart };_aef .InitializeDefaults ();return _aef ;};
// Order returns the order of the series
func (_feaf ScatterChartSeries )Order ()uint32 {return _feaf ._bagba .Order .ValAttr };
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_aae ScatterChart )X ()*_gf .CT_ScatterChart {return _aae ._beba };
2020-10-12 13:59:12 +00:00
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_b *_gf .CT_Area3DChart ;};
2020-10-12 13:59:12 +00:00
// Values returns the value data source.
func (_fab AreaChartSeries )Values ()NumberDataSource {if _fab ._bf .Val ==nil {_fab ._bf .Val =_gf .NewCT_NumDataSource ();};return MakeNumberDataSource (_fab ._bf .Val );};
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_df AreaChart )X ()*_gf .CT_AreaChart {return _df ._fa };
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// BarChartSeries is a series to be used on a bar chart.
2020-10-12 13:59:12 +00:00
type BarChartSeries struct{_bcc *_gf .CT_BarSer };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddLine3DChart adds a new 3D line chart to a chart.
func (_faad Chart )AddLine3DChart ()Line3DChart {_bff (_faad ._ed .Chart );_efc :=_gf .NewCT_PlotAreaChoice ();_faad ._ed .Chart .PlotArea .Choice =append (_faad ._ed .Chart .PlotArea .Choice ,_efc );_efc .Line3DChart =_gf .NewCT_Line3DChart ();_efc .Line3DChart .Grouping =_gf .NewCT_Grouping ();_efc .Line3DChart .Grouping .ValAttr =_gf .ST_GroupingStandard ;return Line3DChart {_cdg :_efc .Line3DChart };};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Values returns the value data source.
func (_ddbe PieChartSeries )Values ()NumberDataSource {if _ddbe ._bae .Val ==nil {_ddbe ._bae .Val =_gf .NewCT_NumDataSource ();};return MakeNumberDataSource (_ddbe ._bae .Val );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_bgg ScatterChartSeries )X ()*_gf .CT_ScatterSer {return _bgg ._bagba };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_cac PieOfPieChart )X ()*_gf .CT_OfPieChart {return _cac ._dcgc };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetDirection changes the direction of the bar chart (bar or column).
func (_gg BarChart )SetDirection (d _gf .ST_BarDir ){_gg ._fg .BarDir .ValAttr =d };func (_gace StockChart )AddAxis (axis Axis ){_bbbg :=_gf .NewCT_UnsignedInt ();_bbbg .ValAttr =axis .AxisID ();_gace ._bfeb .AxId =append (_gace ._bfeb .AxId ,_bbbg );};
2017-09-05 20:20:00 -04:00
2020-10-12 13:59:12 +00:00
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_faca PieChartSeries )SetExplosion (v uint32 ){_faca ._bae .Explosion =_gf .NewCT_UnsignedInt ();_faca ._bae .Explosion .ValAttr =v ;};func (_bafd DateAxis )AxisID ()uint32 {return _bafd ._aac .AxId .ValAttr };func MakeTitle (x *_gf .CT_Title )Title {return Title {x }};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// CategoryAxis returns the category data source.
func (_bcf BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bcf ._ca .XVal ==nil {_bcf ._ca .XVal =_gf .NewCT_AxDataSource ();};return MakeAxisDataSource (_bcf ._ca .XVal );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetOrder sets the order of the series
func (_cbc LineChartSeries )SetOrder (idx uint32 ){_cbc ._dcea .Order .ValAttr =idx };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddAxis adds an axis to a line chart.
func (_gbad LineChart )AddAxis (axis Axis ){_aacg :=_gf .NewCT_UnsignedInt ();_aacg .ValAttr =axis .AxisID ();_gbad ._ebbc .AxId =append (_gbad ._ebbc .AxId ,_aacg );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetText sets the series text.
func (_dff BubbleChartSeries )SetText (s string ){_dff ._ca .Tx =_gf .NewCT_SerTx ();_dff ._ca .Tx .Choice .V =&s ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults the bar chart to its defaults
func (_eg AreaChart )InitializeDefaults (){};func (_abd Title )InitializeDefaults (){_abd .SetText ("\u0054\u0069\u0074l\u0065");_abd .RunProperties ().SetSize (16*_a .Point );_abd .RunProperties ().SetSolidFill (_gd .Black );_abd .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_abd .RunProperties ().SetBold (false );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to an Pie3D chart.
func (_dcg Pie3DChart )AddSeries ()PieChartSeries {_bbb :=_gf .NewCT_PieSer ();_dcg ._fgb .Ser =append (_dcg ._fgb .Ser ,_bbb );_bbb .Idx .ValAttr =uint32 (len (_dcg ._fgb .Ser )-1);_bbb .Order .ValAttr =uint32 (len (_dcg ._fgb .Ser )-1);_beb :=PieChartSeries {_bbb };_beb .InitializeDefaults ();return _beb ;};func (_abbb SeriesAxis )InitializeDefaults (){};func (_cde LineChartSeries )InitializeDefaults (){_cde .Properties ().LineProperties ().SetWidth (1*_a .Point );_cde .Properties ().LineProperties ().SetSolidFill (_gd .Black );_cde .Properties ().LineProperties ().SetJoin (_cg .LineJoinRound );_cde .Marker ().SetSymbol (_gf .ST_MarkerStyleNone );_cde .Labels ().SetShowLegendKey (false );_cde .Labels ().SetShowValue (false );_cde .Labels ().SetShowPercent (false );_cde .Labels ().SetShowCategoryName (false );_cde .Labels ().SetShowSeriesName (false );_cde .Labels ().SetShowLeaderLines (false );};func (_afd RadarChart )AddAxis (axis Axis ){_cff :=_gf .NewCT_UnsignedInt ();_cff .ValAttr =axis .AxisID ();_afd ._gee .AxId =append (_afd ._gee .AxId ,_cff );};
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// Marker returns the marker properties.
2020-10-12 13:59:12 +00:00
func (_dac ScatterChartSeries )Marker ()Marker {if _dac ._bagba .Marker ==nil {_dac ._bagba .Marker =_gf .NewCT_Marker ();};return MakeMarker (_dac ._bagba .Marker );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Labels returns the data label properties.
func (_ebag LineChartSeries )Labels ()DataLabels {if _ebag ._dcea .DLbls ==nil {_ebag ._dcea .DLbls =_gf .NewCT_DLbls ();};return MakeDataLabels (_ebag ._dcea .DLbls );};func (_fda LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fda ._dcea .Cat ==nil {_fda ._dcea .Cat =_gf .NewCT_AxDataSource ();};return MakeAxisDataSource (_fda ._dcea .Cat );};func (_eeb Legend )SetOverlay (b bool ){_eeb ._adc .Overlay =_gf .NewCT_Boolean ();_eeb ._adc .Overlay .ValAttr =_c .Bool (b );};var NullAxis Axis =nullAxis (0);
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetText sets the series text
func (_feeg ScatterChartSeries )SetText (s string ){_feeg ._bagba .Tx =_gf .NewCT_SerTx ();_feeg ._bagba .Tx .Choice .V =&s ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to a Surface chart.
func (_ded Surface3DChart )AddSeries ()SurfaceChartSeries {_gfe :=_ded .nextColor (len (_ded ._acae .Ser ));_edff :=_gf .NewCT_SurfaceSer ();_ded ._acae .Ser =append (_ded ._acae .Ser ,_edff );_edff .Idx .ValAttr =uint32 (len (_ded ._acae .Ser )-1);_edff .Order .ValAttr =uint32 (len (_ded ._acae .Ser )-1);_cgba :=SurfaceChartSeries {_edff };_cgba .InitializeDefaults ();_cgba .Properties ().LineProperties ().SetSolidFill (_gfe );return _cgba ;};func (_eba CategoryAxis )InitializeDefaults (){_eba .SetPosition (_gf .ST_AxPosB );_eba .SetMajorTickMark (_gf .ST_TickMarkOut );_eba .SetMinorTickMark (_gf .ST_TickMarkIn );_eba .SetTickLabelPosition (_gf .ST_TickLblPosNextTo );_eba .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_gd .LightGray );_eba .Properties ().LineProperties ().SetSolidFill (_gd .Black );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the line chart series shape properties.
func (_dead LineChartSeries )Properties ()_cg .ShapeProperties {if _dead ._dcea .SpPr ==nil {_dead ._dcea .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_dead ._dcea .SpPr );};
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_dc BarChartSeries )X ()*_gf .CT_BarSer {return _dc ._bcc };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to an area chart.
func (_gbg Area3DChart )AddSeries ()AreaChartSeries {_bc :=_gbg .nextColor (len (_gbg ._b .Ser ));_ce :=_gf .NewCT_AreaSer ();_gbg ._b .Ser =append (_gbg ._b .Ser ,_ce );_ce .Idx .ValAttr =uint32 (len (_gbg ._b .Ser )-1);_ce .Order .ValAttr =uint32 (len (_gbg ._b .Ser )-1);_eb :=AreaChartSeries {_ce };_eb .InitializeDefaults ();_eb .Properties ().SetSolidFill (_bc );return _eb ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults the bar chart to its defaults
func (_fe BarChart )InitializeDefaults (){_fe .SetDirection (_gf .ST_BarDirCol )};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_bfeb *_gf .CT_StockChart ;};func (_ebe Area3DChart )AddAxis (axis Axis ){_f :=_gf .NewCT_UnsignedInt ();_f .ValAttr =axis .AxisID ();_ebe ._b .AxId =append (_ebe ._b .AxId ,_f );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the bar chart series shape properties.
func (_dbd PieChartSeries )Properties ()_cg .ShapeProperties {if _dbd ._bae .SpPr ==nil {_dbd ._bae .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_dbd ._bae .SpPr );};func (_gedf ScatterChartSeries )SetSmooth (b bool ){_gedf ._bagba .Smooth =_gf .NewCT_Boolean ();_gedf ._bagba .Smooth .ValAttr =&b ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Values returns the value data source.
func (_eaa BubbleChartSeries )Values ()NumberDataSource {if _eaa ._ca .YVal ==nil {_eaa ._ca .YVal =_gf .NewCT_NumDataSource ();};return MakeNumberDataSource (_eaa ._ca .YVal );};func (_edd SeriesAxis )AxisID ()uint32 {return _edd ._fec .AxId .ValAttr };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Values returns the value data source.
func (_fef RadarChartSeries )Values ()NumberDataSource {if _fef ._eebe .Val ==nil {_fef ._eebe .Val =_gf .NewCT_NumDataSource ();};return MakeNumberDataSource (_fef ._eebe .Val );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// CategoryAxis returns the category data source.
func (_dce BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dce ._bcc .Cat ==nil {_dce ._bcc .Cat =_gf .NewCT_AxDataSource ();};return MakeAxisDataSource (_dce ._bcc .Cat );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Values returns the bubble size data source.
func (_eag BubbleChartSeries )BubbleSizes ()NumberDataSource {if _eag ._ca .BubbleSize ==nil {_eag ._ca .BubbleSize =_gf .NewCT_NumDataSource ();};return MakeNumberDataSource (_eag ._ca .BubbleSize );};
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_gagc DoughnutChart )X ()*_gf .CT_DoughnutChart {return _gagc ._eff };func (_aafe SeriesAxis )SetCrosses (axis Axis ){_aafe ._fec .CrossAx .ValAttr =axis .AxisID ()};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};
// 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{_faag *_gf .CT_AxDataSource };
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// InitializeDefaults the bar chart to its defaults
2020-10-12 13:59:12 +00:00
func (_dcff PieOfPieChart )InitializeDefaults (){_dcff ._dcgc .VaryColors =_gf .NewCT_Boolean ();_dcff ._dcgc .VaryColors .ValAttr =_c .Bool (true );_dcff .SetType (_gf .ST_OfPieTypePie );_dcff ._dcgc .SecondPieSize =_gf .NewCT_SecondPieSize ();_dcff ._dcgc .SecondPieSize .ValAttr =&_gf .ST_SecondPieSize {};_dcff ._dcgc .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_c .Uint16 (75);_cab :=_gf .NewCT_ChartLines ();_cab .SpPr =_ea .NewCT_ShapeProperties ();_fcg :=_cg .MakeShapeProperties (_cab .SpPr );_fcg .LineProperties ().SetSolidFill (_gd .Auto );_dcff ._dcgc .SerLines =append (_dcff ._dcgc .SerLines ,_cab );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddAxis adds an axis to a Scatter chart.
func (_agcc ScatterChart )AddAxis (axis Axis ){_gec :=_gf .NewCT_UnsignedInt ();_gec .ValAttr =axis .AxisID ();_agcc ._beba .AxId =append (_agcc ._beba .AxId ,_gec );};func (_dag LineChartSeries )SetSmooth (b bool ){_dag ._dcea .Smooth =_gf .NewCT_Boolean ();_dag ._dcea .Smooth .ValAttr =&b ;};
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_gbd Chart )AddBar3DChart ()Bar3DChart {_bff (_gbd ._ed .Chart );_cda :=_gf .NewCT_PlotAreaChoice ();_gbd ._ed .Chart .PlotArea .Choice =append (_gbd ._ed .Chart .PlotArea .Choice ,_cda );_cda .Bar3DChart =_gf .NewCT_Bar3DChart ();_cda .Bar3DChart .Grouping =_gf .NewCT_BarGrouping ();_cda .Bar3DChart .Grouping .ValAttr =_gf .ST_BarGroupingStandard ;_dda :=Bar3DChart {_ccg :_cda .Bar3DChart };_dda .InitializeDefaults ();return _dda ;};type Title struct{_dbgg *_gf .CT_Title };type GridLines struct{_ggg *_gf .CT_ChartLines };
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_ebg Line3DChart )X ()*_gf .CT_Line3DChart {return _ebg ._cdg };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults initializes an Pie series to the default values.
func (_feee PieChartSeries )InitializeDefaults (){};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetValues is used to set the source data to a set of values.
func (_acc CategoryAxisDataSource )SetValues (v []string ){_acc ._faag .Choice =_gf .NewCT_AxDataSourceChoice ();_acc ._faag .Choice .StrLit =_gf .NewCT_StrData ();_acc ._faag .Choice .StrLit .PtCount =_gf .NewCT_UnsignedInt ();_acc ._faag .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _bad ,_be :=range v {_acc ._faag .Choice .StrLit .Pt =append (_acc ._faag .Choice .StrLit .Pt ,&_gf .CT_StrVal {IdxAttr :uint32 (_bad ),V :_be });};};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetText sets the series text
func (_cgac SurfaceChartSeries )SetText (s string ){_cgac ._ada .Tx =_gf .NewCT_SerTx ();_cgac ._ada .Tx .Choice .V =&s ;};type DateAxis struct{_aac *_gf .CT_DateAx };func (_ffa Legend )InitializeDefaults (){_ffa .SetPosition (_gf .ST_LegendPosR );_ffa .SetOverlay (false );_ffa .Properties ().SetNoFill ();_ffa .Properties ().LineProperties ().SetNoFill ();};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults initializes an Radar series to the default values.
func (_cbde RadarChartSeries )InitializeDefaults (){};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_eafa PieChart )X ()*_gf .CT_PieChart {return _eafa ._cdbc };func (_cgb AreaChart )AddAxis (axis Axis ){_cd :=_gf .NewCT_UnsignedInt ();_cd .ValAttr =axis .AxisID ();_cgb ._fa .AxId =append (_cgb ._fa .AxId ,_cd );};func (_bfb ValueAxis )Properties ()_cg .ShapeProperties {if _bfb ._ggbc .SpPr ==nil {_bfb ._ggbc .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_bfb ._ggbc .SpPr );};func (_abg ValueAxis )SetMajorTickMark (m _gf .ST_TickMark ){if m ==_gf .ST_TickMarkUnset {_abg ._ggbc .MajorTickMark =nil ;}else {_abg ._ggbc .MajorTickMark =_gf .NewCT_TickMark ();_abg ._ggbc .MajorTickMark .ValAttr =m ;};};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_eff *_gf .CT_DoughnutChart ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetIndex sets the index of the series
func (_ffd LineChartSeries )SetIndex (idx uint32 ){_ffd ._dcea .Idx .ValAttr =idx };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_egf CategoryAxisDataSource )SetNumberReference (s string ){_egf ._faag .Choice =_gf .NewCT_AxDataSourceChoice ();_egf ._faag .Choice .NumRef =_gf .NewCT_NumRef ();_egf ._faag .Choice .NumRef .F =s ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddRadarChart adds a new radar chart to a chart.
func (_fcf Chart )AddRadarChart ()RadarChart {_cge :=_gf .NewCT_PlotAreaChoice ();_fcf ._ed .Chart .PlotArea .Choice =append (_fcf ._ed .Chart .PlotArea .Choice ,_cge );_cge .RadarChart =_gf .NewCT_RadarChart ();_decd :=RadarChart {_gee :_cge .RadarChart };_decd .InitializeDefaults ();return _decd ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to an Pie chart.
func (_bec PieChart )AddSeries ()PieChartSeries {_gegd :=_gf .NewCT_PieSer ();_bec ._cdbc .Ser =append (_bec ._cdbc .Ser ,_gegd );_gegd .Idx .ValAttr =uint32 (len (_bec ._cdbc .Ser )-1);_gegd .Order .ValAttr =uint32 (len (_bec ._cdbc .Ser )-1);_eecc :=PieChartSeries {_gegd };_eecc .InitializeDefaults ();return _eecc ;};func (_ee DataLabels )SetShowValue (b bool ){_ee .ensureChoice ();_ee ._bdd .Choice .ShowVal =_gf .NewCT_Boolean ();_ee ._bdd .Choice .ShowVal .ValAttr =_c .Bool (b );};func (_cfga DateAxis )SetTickLabelPosition (p _gf .ST_TickLblPos ){if p ==_gf .ST_TickLblPosUnset {_cfga ._aac .TickLblPos =nil ;}else {_cfga ._aac .TickLblPos =_gf .NewCT_TickLblPos ();_cfga ._aac .TickLblPos .ValAttr =p ;};};func (_gbf Legend )SetPosition (p _gf .ST_LegendPos ){if p ==_gf .ST_LegendPosUnset {_gbf ._adc .LegendPos =nil ;}else {_gbf ._adc .LegendPos =_gf .NewCT_LegendPos ();_gbf ._adc .LegendPos .ValAttr =p ;};};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_gae BubbleChart )X ()*_gf .CT_BubbleChart {return _gae ._fad };func (_fcd SurfaceChartSeries )InitializeDefaults (){_fcd .Properties ().LineProperties ().SetWidth (1*_a .Point );_fcd .Properties ().LineProperties ().SetSolidFill (_gd .Black );_fcd .Properties ().LineProperties ().SetJoin (_cg .LineJoinRound );};func (_afb ValueAxis )AxisID ()uint32 {return _afb ._ggbc .AxId .ValAttr };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_ca *_gf .CT_BubbleSer };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddAxis adds an axis to a Surface chart.
func (_ffg Surface3DChart )AddAxis (axis Axis ){_fagc :=_gf .NewCT_UnsignedInt ();_fagc .ValAttr =axis .AxisID ();_ffg ._acae .AxId =append (_ffg ._acae .AxId ,_fagc );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Marker returns the marker properties.
func (_fb LineChartSeries )Marker ()Marker {if _fb ._dcea .Marker ==nil {_fb ._dcea .Marker =_gf .NewCT_Marker ();};return MakeMarker (_fb ._dcea .Marker );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults the bar chart to its defaults
func (_cdf Bar3DChart )InitializeDefaults (){_cdf .SetDirection (_gf .ST_BarDirCol )};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_dcgc *_gf .CT_OfPieChart ;};type ScatterChart struct{chartBase ;_beba *_gf .CT_ScatterChart ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_bca LineChartSeries )X ()*_gf .CT_LineSer {return _bca ._dcea };type SeriesAxis struct{_fec *_gf .CT_SerAx };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetValues sets values directly on a source.
func (_eda NumberDataSource )SetValues (v []float64 ){_eda .ensureChoice ();_eda ._efe .Choice .NumRef =nil ;_eda ._efe .Choice .NumLit =_gf .NewCT_NumData ();_eda ._efe .Choice .NumLit .PtCount =_gf .NewCT_UnsignedInt ();_eda ._efe .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _cefc ,_ddb :=range v {_eda ._efe .Choice .NumLit .Pt =append (_eda ._efe .Choice .NumLit .Pt ,&_gf .CT_NumVal {IdxAttr :uint32 (_cefc ),V :_e .Sprintf ("\u0025\u0067",_ddb )});};};func (_ccbcc SurfaceChartSeries )Values ()NumberDataSource {if _ccbcc ._ada .Val ==nil {_ccbcc ._ada .Val =_gf .NewCT_NumDataSource ();};_fcea :=MakeNumberDataSource (_ccbcc ._ada .Val );_fcea .CreateEmptyNumberCache ();return _fcea ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// CategoryAxis returns the category data source.
func (_cfd RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cfd ._eebe .Cat ==nil {_cfd ._eebe .Cat =_gf .NewCT_AxDataSource ();};return MakeAxisDataSource (_cfd ._eebe .Cat );};
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the line chart series shape properties.
func (_caeg SurfaceChartSeries )Properties ()_cg .ShapeProperties {if _caeg ._ada .SpPr ==nil {_caeg ._ada .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_caeg ._ada .SpPr );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetText sets the series text.
func (_efec PieChartSeries )SetText (s string ){_efec ._bae .Tx =_gf .NewCT_SerTx ();_efec ._bae .Tx .Choice .V =&s ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddPieOfPieChart adds a new pie chart to a chart.
func (_ebed Chart )AddPieOfPieChart ()PieOfPieChart {_egc :=_gf .NewCT_PlotAreaChoice ();_ebed ._ed .Chart .PlotArea .Choice =append (_ebed ._ed .Chart .PlotArea .Choice ,_egc );_egc .OfPieChart =_gf .NewCT_OfPieChart ();_aeb :=PieOfPieChart {_dcgc :_egc .OfPieChart };_aeb .InitializeDefaults ();return _aeb ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to a bar chart.
func (_dg BarChart )AddSeries ()BarChartSeries {_abe :=_dg .nextColor (len (_dg ._fg .Ser ));_bg :=_gf .NewCT_BarSer ();_dg ._fg .Ser =append (_dg ._fg .Ser ,_bg );_bg .Idx .ValAttr =uint32 (len (_dg ._fg .Ser )-1);_bg .Order .ValAttr =uint32 (len (_dg ._fg .Ser )-1);_ge :=BarChartSeries {_bg };_ge .InitializeDefaults ();_ge .Properties ().SetSolidFill (_abe );return _ge ;};type Legend struct{_adc *_gf .CT_Legend };func (_ebf CategoryAxis )SetCrosses (axis Axis ){_ebf ._eaf .Choice =_gf .NewEG_AxSharedChoice ();_ebf ._eaf .Choice .Crosses =_gf .NewCT_Crosses ();_ebf ._eaf .Choice .Crosses .ValAttr =_gf .ST_CrossesAutoZero ;_ebf ._eaf .CrossAx .ValAttr =axis .AxisID ();};func (_dbg SurfaceChart )InitializeDefaults (){_dbg ._gfaa .Wireframe =_gf .NewCT_Boolean ();_dbg ._gfaa .Wireframe .ValAttr =_c .Bool (false );_dbg ._gfaa .BandFmts =_gf .NewCT_BandFmts ();for _ffe :=0;_ffe < 15;_ffe ++{_def :=_gf .NewCT_BandFmt ();_def .Idx .ValAttr =uint32 (_ffe );_def .SpPr =_ea .NewCT_ShapeProperties ();_ffc :=_cg .MakeShapeProperties (_def .SpPr );_ffc .SetSolidFill (_dbg .nextColor (_ffe ));_dbg ._gfaa .BandFmts .BandFmt =append (_dbg ._gfaa .BandFmts .BandFmt ,_def );};};func (_dec CategoryAxis )MajorGridLines ()GridLines {if _dec ._eaf .MajorGridlines ==nil {_dec ._eaf .MajorGridlines =_gf .NewCT_ChartLines ();};return GridLines {_dec ._eaf .MajorGridlines };};func (_cbe DateAxis )SetPosition (p _gf .ST_AxPos ){_cbe ._aac .AxPos =_gf .NewCT_AxPos ();_cbe ._aac .AxPos .ValAttr =p ;};func (_cbg Marker )SetSize (sz uint8 ){_cbg ._aegc .Size =_gf .NewCT_MarkerSize ();_cbg ._aegc .Size .ValAttr =&sz ;};func (_fgf DateAxis )MajorGridLines ()GridLines {if _fgf ._aac .MajorGridlines ==nil {_fgf ._aac .MajorGridlines =_gf .NewCT_ChartLines ();};return GridLines {_fgf ._aac .MajorGridlines };};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults initializes an area series to the default values.
func (_ac AreaChartSeries )InitializeDefaults (){};
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_cga RadarChart )X ()*_gf .CT_RadarChart {return _cga ._gee };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_eebe *_gf .CT_RadarSer };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetType sets the type the secone pie to either pie or bar
func (_cceg PieOfPieChart )SetType (t _gf .ST_OfPieType ){_cceg ._dcgc .OfPieType .ValAttr =t };
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// CategoryAxis returns the category data source.
func (_ef AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ef ._bf .Cat ==nil {_ef ._bf .Cat =_gf .NewCT_AxDataSource ();};return MakeAxisDataSource (_ef ._bf .Cat );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_cee Bar3DChart )X ()*_gf .CT_Bar3DChart {return _cee ._ccg };
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// SetDirection changes the direction of the bar chart (bar or column).
func (_bbe Bar3DChart )SetDirection (d _gf .ST_BarDir ){_bbe ._ccg .BarDir .ValAttr =d };
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_gee *_gf .CT_RadarChart ;};func (_cf nullAxis )AxisID ()uint32 {return 0};
2020-08-31 22:58:25 +00:00
// InitializeDefaults the bar chart to its defaults
2020-10-12 13:59:12 +00:00
func (_cdeg Pie3DChart )InitializeDefaults (){_cdeg ._fgb .VaryColors =_gf .NewCT_Boolean ();_cdeg ._fgb .VaryColors .ValAttr =_c .Bool (true );};func (_dcgf ScatterChartSeries )InitializeDefaults (){_dcgf .Properties ().LineProperties ().SetNoFill ();_dcgf .Marker ().SetSymbol (_gf .ST_MarkerStyleAuto );_dcgf .Labels ().SetShowLegendKey (false );_dcgf .Labels ().SetShowValue (true );_dcgf .Labels ().SetShowPercent (false );_dcgf .Labels ().SetShowCategoryName (false );_dcgf .Labels ().SetShowSeriesName (false );_dcgf .Labels ().SetShowLeaderLines (false );};
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// Index returns the index of the series
func (_dfe LineChartSeries )Index ()uint32 {return _dfe ._dcea .Idx .ValAttr };func (_cfc Bar3DChart )AddAxis (axis Axis ){_aa :=_gf .NewCT_UnsignedInt ();_aa .ValAttr =axis .AxisID ();_cfc ._ccg .AxId =append (_cfc ._ccg .AxId ,_aa );};
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// SetIndex sets the index of the series
func (_ccbc ScatterChartSeries )SetIndex (idx uint32 ){_ccbc ._bagba .Idx .ValAttr =idx };func (_ggb CategoryAxis )SetMinorTickMark (m _gf .ST_TickMark ){if m ==_gf .ST_TickMarkUnset {_ggb ._eaf .MinorTickMark =nil ;}else {_ggb ._eaf .MinorTickMark =_gf .NewCT_TickMark ();_ggb ._eaf .MinorTickMark .ValAttr =m ;};};func (_cefg ValueAxis )SetMinorTickMark (m _gf .ST_TickMark ){if m ==_gf .ST_TickMarkUnset {_cefg ._ggbc .MinorTickMark =nil ;}else {_cefg ._ggbc .MinorTickMark =_gf .NewCT_TickMark ();_cefg ._ggbc .MinorTickMark .ValAttr =m ;};};func (_egcf Title )ParagraphProperties ()_cg .ParagraphProperties {if _egcf ._dbgg .Tx ==nil {_egcf .SetText ("");};if _egcf ._dbgg .Tx .Choice .Rich .P [0].PPr ==nil {_egcf ._dbgg .Tx .Choice .Rich .P [0].PPr =_ea .NewCT_TextParagraphProperties ();};return _cg .MakeParagraphProperties (_egcf ._dbgg .Tx .Choice .Rich .P [0].PPr );};
2020-08-23 14:15:53 +00:00
// X returns the inner wrapped XML type.
2020-10-12 13:59:12 +00:00
func (_bag LineChart )X ()*_gf .CT_LineChart {return _bag ._ebbc };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults initializes a bar chart series to the default values.
func (_eac BarChartSeries )InitializeDefaults (){};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults the bar chart to its defaults
func (_ddc RadarChart )InitializeDefaults (){_ddc ._gee .RadarStyle .ValAttr =_gf .ST_RadarStyleMarker };type Line3DChart struct{chartBase ;_cdg *_gf .CT_Line3DChart ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// InitializeDefaults the Stock chart to its defaults
func (_abbf StockChart )InitializeDefaults (){_abbf ._bfeb .HiLowLines =_gf .NewCT_ChartLines ();_abbf ._bfeb .UpDownBars =_gf .NewCT_UpDownBars ();_abbf ._bfeb .UpDownBars .GapWidth =_gf .NewCT_GapAmount ();_abbf ._bfeb .UpDownBars .GapWidth .ValAttr =&_gf .ST_GapAmount {};_abbf ._bfeb .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_c .Uint16 (150);_abbf ._bfeb .UpDownBars .UpBars =_gf .NewCT_UpDownBar ();_abbf ._bfeb .UpDownBars .DownBars =_gf .NewCT_UpDownBar ();};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddLineChart adds a new line chart to a chart.
func (_gfa Chart )AddLineChart ()LineChart {_bbef :=_gf .NewCT_PlotAreaChoice ();_gfa ._ed .Chart .PlotArea .Choice =append (_gfa ._ed .Chart .PlotArea .Choice ,_bbef );_bbef .LineChart =_gf .NewCT_LineChart ();_bbef .LineChart .Grouping =_gf .NewCT_Grouping ();_bbef .LineChart .Grouping .ValAttr =_gf .ST_GroupingStandard ;return LineChart {_ebbc :_bbef .LineChart };};func (_bd CategoryAxis )Properties ()_cg .ShapeProperties {if _bd ._eaf .SpPr ==nil {_bd ._eaf .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_bd ._eaf .SpPr );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the bar chart series shape properties.
func (_ab AreaChartSeries )Properties ()_cg .ShapeProperties {if _ab ._bf .SpPr ==nil {_ab ._bf .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_ab ._bf .SpPr );};func (_eeff ScatterChartSeries )Values ()NumberDataSource {if _eeff ._bagba .YVal ==nil {_eeff ._bagba .YVal =_gf .NewCT_NumDataSource ();};return MakeNumberDataSource (_eeff ._bagba .YVal );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddAxis adds an axis to a Surface chart.
func (_dbc SurfaceChart )AddAxis (axis Axis ){_fbe :=_gf .NewCT_UnsignedInt ();_fbe .ValAttr =axis .AxisID ();_dbc ._gfaa .AxId =append (_dbc ._gfaa .AxId ,_fbe );};func (_ace Marker )SetSymbol (s _gf .ST_MarkerStyle ){if s ==_gf .ST_MarkerStyleUnset {_ace ._aegc .Symbol =nil ;}else {_ace ._aegc .Symbol =_gf .NewCT_MarkerStyle ();_ace ._aegc .Symbol .ValAttr =s ;};};func (_bebe Title )RunProperties ()_cg .RunProperties {if _bebe ._dbgg .Tx ==nil {_bebe .SetText ("");};if _bebe ._dbgg .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_bebe ._dbgg .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_ea .NewCT_TextCharacterProperties ();};return _cg .MakeRunProperties (_bebe ._dbgg .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to a Bubble chart.
func (_de BubbleChart )AddSeries ()BubbleChartSeries {_aff :=_de .nextColor (len (_de ._fad .Ser ));_ccb :=_gf .NewCT_BubbleSer ();_de ._fad .Ser =append (_de ._fad .Ser ,_ccb );_ccb .Idx .ValAttr =uint32 (len (_de ._fad .Ser )-1);_ccb .Order .ValAttr =uint32 (len (_de ._fad .Ser )-1);_faf :=BubbleChartSeries {_ccb };_faf .InitializeDefaults ();_faf .Properties ().SetSolidFill (_aff );return _faf ;};func (_bac DataLabels )ensureChoice (){if _bac ._bdd .Choice ==nil {_bac ._bdd .Choice =_gf .NewCT_DLblsChoice ();};};type NumberDataSource struct{_efe *_gf .CT_NumDataSource };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_ccg *_gf .CT_Bar3DChart ;};func (_aeba NumberDataSource )SetReference (s string ){_aeba .ensureChoice ();if _aeba ._efe .Choice .NumRef ==nil {_aeba ._efe .Choice .NumRef =_gf .NewCT_NumRef ();};_aeba ._efe .Choice .NumRef .F =s ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to a line chart.
func (_fde LineChart )AddSeries ()LineChartSeries {_cfe :=_fde .nextColor (len (_fde ._ebbc .Ser ));_ebfb :=_gf .NewCT_LineSer ();_fde ._ebbc .Ser =append (_fde ._ebbc .Ser ,_ebfb );_ebfb .Idx .ValAttr =uint32 (len (_fde ._ebbc .Ser )-1);_ebfb .Order .ValAttr =uint32 (len (_fde ._ebbc .Ser )-1);_cfed :=LineChartSeries {_ebfb };_cfed .InitializeDefaults ();_cfed .Properties ().LineProperties ().SetSolidFill (_cfe );return _cfed ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_dcea *_gf .CT_LineSer };func (_ceeg DateAxis )Properties ()_cg .ShapeProperties {if _ceeg ._aac .SpPr ==nil {_ceeg ._aac .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_ceeg ._aac .SpPr );};func MakeNumberDataSource (x *_gf .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_gfg ValueAxis )X ()*_gf .CT_ValAx {return _gfg ._ggbc };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetText sets the series text.
func (_eea RadarChartSeries )SetText (s string ){_eea ._eebe .Tx =_gf .NewCT_SerTx ();_eea ._eebe .Tx .Choice .V =&s ;};func (_fdf DataLabels )SetPosition (p _gf .ST_DLblPos ){_fdf .ensureChoice ();_fdf ._bdd .Choice .DLblPos =_gf .NewCT_DLblPos ();_fdf ._bdd .Choice .DLblPos .ValAttr =p ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_gfaa *_gf .CT_SurfaceChart ;};func (_cdb BarChart )AddAxis (axis Axis ){_gfc :=_gf .NewCT_UnsignedInt ();_gfc .ValAttr =axis .AxisID ();_cdb ._fg .AxId =append (_cdb ._fg .AxId ,_gfc );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// X returns the inner wrapped XML type.
func (_eab Chart )X ()*_gf .ChartSpace {return _eab ._ed };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddSurfaceChart adds a new surface chart to a chart.
func (_cddd Chart )AddSurfaceChart ()SurfaceChart {_ad :=_gf .NewCT_PlotAreaChoice ();_cddd ._ed .Chart .PlotArea .Choice =append (_cddd ._ed .Chart .PlotArea .Choice ,_ad );_ad .SurfaceChart =_gf .NewCT_SurfaceChart ();_bff (_cddd ._ed .Chart );_cddd ._ed .Chart .View3D .RotX .ValAttr =_c .Int8 (90);_cddd ._ed .Chart .View3D .RotY .ValAttr =_c .Uint16 (0);_cddd ._ed .Chart .View3D .Perspective =_gf .NewCT_Perspective ();_cddd ._ed .Chart .View3D .Perspective .ValAttr =_c .Uint8 (0);_gdb :=SurfaceChart {_gfaa :_ad .SurfaceChart };_gdb .InitializeDefaults ();return _gdb ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddBubbleChart adds a new bubble chart.
func (_edb Chart )AddBubbleChart ()BubbleChart {_cbb :=_gf .NewCT_PlotAreaChoice ();_edb ._ed .Chart .PlotArea .Choice =append (_edb ._ed .Chart .PlotArea .Choice ,_cbb );_cbb .BubbleChart =_gf .NewCT_BubbleChart ();_db :=BubbleChart {_fad :_cbb .BubbleChart };_db .InitializeDefaults ();return _db ;};func (_cdgb NumberDataSource )ensureChoice (){if _cdgb ._efe .Choice ==nil {_cdgb ._efe .Choice =_gf .NewCT_NumDataSourceChoice ();};};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddCategoryAxis adds a category axis.
func (_gfae Chart )AddCategoryAxis ()CategoryAxis {_bfd :=_gf .NewCT_CatAx ();if _gfae ._ed .Chart .PlotArea .CChoice ==nil {_gfae ._ed .Chart .PlotArea .CChoice =_gf .NewCT_PlotAreaChoice1 ();};_bfd .AxId =_gf .NewCT_UnsignedInt ();_bfd .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_gfae ._ed .Chart .PlotArea .CChoice .CatAx =append (_gfae ._ed .Chart .PlotArea .CChoice .CatAx ,_bfd );_bfd .Auto =_gf .NewCT_Boolean ();_bfd .Auto .ValAttr =_c .Bool (true );_bfd .Delete =_gf .NewCT_Boolean ();_bfd .Delete .ValAttr =_c .Bool (false );_dcf :=MakeCategoryAxis (_bfd );_dcf .InitializeDefaults ();return _dcf ;};func (_dbe DateAxis )SetMinorTickMark (m _gf .ST_TickMark ){if m ==_gf .ST_TickMarkUnset {_dbe ._aac .MinorTickMark =nil ;}else {_dbe ._aac .MinorTickMark =_gf .NewCT_TickMark ();_dbe ._aac .MinorTickMark .ValAttr =m ;};};
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// SetText sets the series text.
2020-10-12 13:59:12 +00:00
func (_ag AreaChartSeries )SetText (s string ){_ag ._bf .Tx =_gf .NewCT_SerTx ();_ag ._bf .Tx .Choice .V =&s ;};
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// RemoveTitle removes any existing title from the chart.
func (_baf Chart )RemoveTitle (){_baf ._ed .Chart .Title =nil ;_baf ._ed .Chart .AutoTitleDeleted =_gf .NewCT_Boolean ();_baf ._ed .Chart .AutoTitleDeleted .ValAttr =_c .Bool (true );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// SetText sets the series text
func (_ddga LineChartSeries )SetText (s string ){_ddga ._dcea .Tx =_gf .NewCT_SerTx ();_ddga ._dcea .Tx .Choice .V =&s ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddStockChart adds a new stock chart.
func (_ae Chart )AddStockChart ()StockChart {_gbe :=_gf .NewCT_PlotAreaChoice ();_ae ._ed .Chart .PlotArea .Choice =append (_ae ._ed .Chart .PlotArea .Choice ,_gbe );_gbe .StockChart =_gf .NewCT_StockChart ();_cb :=StockChart {_bfeb :_gbe .StockChart };_cb .InitializeDefaults ();return _cb ;};type CategoryAxis struct{_eaf *_gf .CT_CatAx };type nullAxis byte ;func (_bgf DataLabels )SetShowSeriesName (b bool ){_bgf .ensureChoice ();_bgf ._bdd .Choice .ShowSerName =_gf .NewCT_Boolean ();_bgf ._bdd .Choice .ShowSerName .ValAttr =_c .Bool (b );};func (_gca DataLabels )SetShowLeaderLines (b bool ){_gca .ensureChoice ();_gca ._bdd .Choice .ShowLeaderLines =_gf .NewCT_Boolean ();_gca ._bdd .Choice .ShowLeaderLines .ValAttr =_c .Bool (b );};func (_efg DateAxis )SetMajorTickMark (m _gf .ST_TickMark ){if m ==_gf .ST_TickMarkUnset {_efg ._aac .MajorTickMark =nil ;}else {_efg ._aac .MajorTickMark =_gf .NewCT_TickMark ();_efg ._aac .MajorTickMark .ValAttr =m ;};};func (_egg chartBase )nextColor (_bab int )_gd .Color {return _bge [_bab %len (_bge )]};func (_faa CategoryAxis )SetPosition (p _gf .ST_AxPos ){_faa ._eaf .AxPos =_gf .NewCT_AxPos ();_faa ._eaf .AxPos .ValAttr =p ;};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_bf *_gf .CT_AreaSer };func (_faba Chart )AddSeriesAxis ()SeriesAxis {_dee :=_gf .NewCT_SerAx ();if _faba ._ed .Chart .PlotArea .CChoice ==nil {_faba ._ed .Chart .PlotArea .CChoice =_gf .NewCT_PlotAreaChoice1 ();};_dee .AxId =_gf .NewCT_UnsignedInt ();_dee .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_faba ._ed .Chart .PlotArea .CChoice .SerAx =append (_faba ._ed .Chart .PlotArea .CChoice .SerAx ,_dee );_dee .Delete =_gf .NewCT_Boolean ();_dee .Delete .ValAttr =_c .Bool (false );_deae :=MakeSeriesAxis (_dee );_deae .InitializeDefaults ();return _deae ;};func MakeValueAxis (x *_gf .CT_ValAx )ValueAxis {return ValueAxis {x }};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddAreaChart adds a new area chart to a chart.
func (_fee Chart )AddAreaChart ()AreaChart {_feab :=_gf .NewCT_PlotAreaChoice ();_fee ._ed .Chart .PlotArea .Choice =append (_fee ._ed .Chart .PlotArea .Choice ,_feab );_feab .AreaChart =_gf .NewCT_AreaChart ();_fac :=AreaChart {_fa :_feab .AreaChart };_fac .InitializeDefaults ();return _fac ;};type chartBase struct{};
2020-10-12 13:59:12 +00:00
// SetDisplayBlanksAs controls how missing values are displayed.
func (_dba Chart )SetDisplayBlanksAs (v _gf .ST_DispBlanksAs ){_dba ._ed .Chart .DispBlanksAs =_gf .NewCT_DispBlanksAs ();_dba ._ed .Chart .DispBlanksAs .ValAttr =v ;};
2020-10-12 13:59:12 +00:00
// Order returns the order of the series
func (_gab SurfaceChartSeries )Order ()uint32 {return _gab ._ada .Order .ValAttr };
2020-10-12 13:59:12 +00:00
// AddSeries adds a default series to an area chart.
func (_bb AreaChart )AddSeries ()AreaChartSeries {_gc :=_bb .nextColor (len (_bb ._fa .Ser ));_ga :=_gf .NewCT_AreaSer ();_bb ._fa .Ser =append (_bb ._fa .Ser ,_ga );_ga .Idx .ValAttr =uint32 (len (_bb ._fa .Ser )-1);_ga .Order .ValAttr =uint32 (len (_bb ._fa .Ser )-1);_ba :=AreaChartSeries {_ga };_ba .InitializeDefaults ();_ba .Properties ().SetSolidFill (_gc );return _ba ;};func MakeSeriesAxis (x *_gf .CT_SerAx )SeriesAxis {return SeriesAxis {x }};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// Properties returns the Bubble chart series shape properties.
func (_ccgc BubbleChartSeries )Properties ()_cg .ShapeProperties {if _ccgc ._ca .SpPr ==nil {_ccgc ._ca .SpPr =_ea .NewCT_ShapeProperties ();};return _cg .MakeShapeProperties (_ccgc ._ca .SpPr );};
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// CategoryAxis returns the category data source.
func (_gacc PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gacc ._bae .Cat ==nil {_gacc ._bae .Cat =_gf .NewCT_AxDataSource ();};return MakeAxisDataSource (_gacc ._bae .Cat );};type SurfaceChartSeries struct{_ada *_gf .CT_SurfaceSer };
2020-08-23 14:15:53 +00:00
2020-10-12 13:59:12 +00:00
// AddBarChart adds a new bar chart to a chart.
func (_cce Chart )AddBarChart ()BarChart {_fca :=_gf .NewCT_PlotAreaChoice ();_cce ._ed .Chart .PlotArea .Choice =append (_cce ._ed .Chart .PlotArea .Choice ,_fca );_fca .BarChart =_gf .NewCT_BarChart ();_fca .BarChart .Grouping =_gf .NewCT_BarGrouping ();_fca .BarChart .Grouping .ValAttr =_gf .ST_BarGroupingStandard ;_cef :=BarChart {_fg :_fca .BarChart };_cef .InitializeDefaults ();return _cef ;};
2020-08-31 22:58:25 +00:00
2020-10-12 13:59:12 +00:00
// AddPie3DChart adds a new pie chart to a chart.
func (_bbc Chart )AddPie3DChart ()Pie3DChart {_bff (_bbc ._ed .Chart );_gce :=_gf .NewCT_PlotAreaChoice ();_bbc ._ed .Chart .PlotArea .Choice =append (_bbc ._ed .Chart .PlotArea .Choice ,_gce );_gce .Pie3DChart =_gf .NewCT_Pie3DChart ();_ec :=Pie3DChart {_fgb :_gce .Pie3DChart };_ec .InitializeDefaults ();return _ec ;};func (_dadb ValueAxis )SetCrosses (axis Axis ){_dadb ._ggbc .CrossAx .ValAttr =axis .AxisID ()};
// Index returns the index of the series
func (_efb SurfaceChartSeries )Index ()uint32 {return _efb ._ada .Idx .ValAttr };