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/
2022-09-02 11:46:53 +00:00
package chart ;import (_f "fmt";_ge "github.com/unidoc/unioffice";_fc "github.com/unidoc/unioffice/color";_fa "github.com/unidoc/unioffice/drawing";_fb "github.com/unidoc/unioffice/measurement";_b "github.com/unidoc/unioffice/schema/soo/dml";_g "github.com/unidoc/unioffice/schema/soo/dml/chart";_a "math/rand";);type GridLines struct{_bcad *_g .CT_ChartLines };
2022-09-02 11:46:53 +00:00
// AddAreaChart adds a new area chart to a chart.
func (_ae Chart )AddAreaChart ()AreaChart {_edd :=_g .NewCT_PlotAreaChoice ();_ae ._gcf .Chart .PlotArea .Choice =append (_ae ._gcf .Chart .PlotArea .Choice ,_edd );_edd .AreaChart =_g .NewCT_AreaChart ();_efb :=AreaChart {_ab :_edd .AreaChart };_efb .InitializeDefaults ();return _efb ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddArea3DChart adds a new area chart to a chart.
func (_aaa Chart )AddArea3DChart ()Area3DChart {_dfd (_aaa ._gcf .Chart );_ac :=_g .NewCT_PlotAreaChoice ();_aaa ._gcf .Chart .PlotArea .Choice =append (_aaa ._gcf .Chart .PlotArea .Choice ,_ac );_ac .Area3DChart =_g .NewCT_Area3DChart ();_ccb :=Area3DChart {_e :_ac .Area3DChart };_ccb .InitializeDefaults ();return _ccb ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_eaa Chart )AddLegend ()Legend {_eaa ._gcf .Chart .Legend =_g .NewCT_Legend ();_ceaf :=MakeLegend (_eaa ._gcf .Chart .Legend );_ceaf .InitializeDefaults ();return _ceaf ;};
2021-06-16 07:10:52 +00:00
2022-09-02 11:46:53 +00:00
// Labels returns the data label properties.
func (_gcbe LineChartSeries )Labels ()DataLabels {if _gcbe ._fda .DLbls ==nil {_gcbe ._fda .DLbls =_g .NewCT_DLbls ();};return MakeDataLabels (_gcbe ._fda .DLbls );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_fcbb Surface3DChart )X ()*_g .CT_Surface3DChart {return _fcbb ._dgb };
2021-05-31 16:22:30 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults the bar chart to its defaults
func (_fcde PieOfPieChart )InitializeDefaults (){_fcde ._adc .VaryColors =_g .NewCT_Boolean ();_fcde ._adc .VaryColors .ValAttr =_ge .Bool (true );_fcde .SetType (_g .ST_OfPieTypePie );_fcde ._adc .SecondPieSize =_g .NewCT_SecondPieSize ();_fcde ._adc .SecondPieSize .ValAttr =&_g .ST_SecondPieSize {};_fcde ._adc .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_ge .Uint16 (75);_dega :=_g .NewCT_ChartLines ();_dega .SpPr =_b .NewCT_ShapeProperties ();_bbfe :=_fa .MakeShapeProperties (_dega .SpPr );_bbfe .LineProperties ().SetSolidFill (_fc .Auto );_fcde ._adc .SerLines =append (_fcde ._adc .SerLines ,_dega );};
2022-02-05 13:05:36 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_fgd AreaChartSeries )X ()*_g .CT_AreaSer {return _fgd ._afa };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_acge LineChart )X ()*_g .CT_LineChart {return _acge ._fbd };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_egb *_g .CT_BubbleChart ;};type Line3DChart struct{chartBase ;_dbgc *_g .CT_Line3DChart ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddCategoryAxis adds a category axis.
func (_gabd Chart )AddCategoryAxis ()CategoryAxis {_afd :=_g .NewCT_CatAx ();if _gabd ._gcf .Chart .PlotArea .CChoice ==nil {_gabd ._gcf .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_afd .AxId =_g .NewCT_UnsignedInt ();_afd .AxId .ValAttr =0x7FFFFFFF&_a .Uint32 ();_gabd ._gcf .Chart .PlotArea .CChoice .CatAx =append (_gabd ._gcf .Chart .PlotArea .CChoice .CatAx ,_afd );_afd .Auto =_g .NewCT_Boolean ();_afd .Auto .ValAttr =_ge .Bool (true );_afd .Delete =_g .NewCT_Boolean ();_afd .Delete .ValAttr =_ge .Bool (false );_cfge :=MakeCategoryAxis (_afd );_cfge .InitializeDefaults ();return _cfge ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_dcfg CategoryAxisDataSource )SetNumberReference (s string ){_dcfg ._bg .Choice =_g .NewCT_AxDataSourceChoice ();_dcfg ._bg .Choice .NumRef =_g .NewCT_NumRef ();_dcfg ._bg .Choice .NumRef .F =s ;};func (_gegd SeriesAxis )AxisID ()uint32 {return _gegd ._ecge .AxId .ValAttr };func (_ddb DataLabels )SetShowCategoryName (b bool ){_ddb .ensureChoice ();_ddb ._dca .Choice .ShowCatName =_g .NewCT_Boolean ();_ddb ._dca .Choice .ShowCatName .ValAttr =_ge .Bool (b );};
2021-09-22 16:41:01 +00:00
2022-09-02 11:46:53 +00:00
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};
2021-11-10 11:45:21 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to an Doughnut chart.
func (_aad DoughnutChart )AddSeries ()PieChartSeries {_dbg :=_g .NewCT_PieSer ();_aad ._fecf .Ser =append (_aad ._fecf .Ser ,_dbg );_dbg .Idx .ValAttr =uint32 (len (_aad ._fecf .Ser )-1);_dbg .Order .ValAttr =uint32 (len (_aad ._fecf .Ser )-1);_fbf :=PieChartSeries {_dbg };_fbf .InitializeDefaults ();return _fbf ;};type CategoryAxis struct{_gda *_g .CT_CatAx };func (_fdg ValueAxis )SetPosition (p _g .ST_AxPos ){_fdg ._bge .AxPos =_g .NewCT_AxPos ();_fdg ._bge .AxPos .ValAttr =p ;};
2021-11-10 11:45:21 +00:00
2022-09-02 11:46:53 +00:00
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_edc Chart )AddDoughnutChart ()DoughnutChart {_edf :=_g .NewCT_PlotAreaChoice ();_edc ._gcf .Chart .PlotArea .Choice =append (_edc ._gcf .Chart .PlotArea .Choice ,_edf );_edf .DoughnutChart =_g .NewCT_DoughnutChart ();_fddg :=DoughnutChart {_fecf :_edf .DoughnutChart };_fddg .InitializeDefaults ();return _fddg ;};func (_dcf CategoryAxis )SetPosition (p _g .ST_AxPos ){_dcf ._gda .AxPos =_g .NewCT_AxPos ();_dcf ._gda .AxPos .ValAttr =p ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// SetType sets the type the secone pie to either pie or bar
func (_eabc PieOfPieChart )SetType (t _g .ST_OfPieType ){_eabc ._adc .OfPieType .ValAttr =t };
2020-10-12 13:59:12 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_fdc BarChart )X ()*_g .CT_BarChart {return _fdc ._ec };
2020-10-12 13:59:12 +00:00
2022-09-02 11:46:53 +00:00
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_bac *_g .CT_BubbleSer };func (_cc CategoryAxis )MajorGridLines ()GridLines {if _cc ._gda .MajorGridlines ==nil {_cc ._gda .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_cc ._gda .MajorGridlines };};
2022-01-15 21:17:38 +00:00
2022-09-02 11:46:53 +00:00
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_gfg *_g .CT_PieSer };
2022-01-15 21:17:38 +00:00
2022-09-02 11:46:53 +00:00
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_fecf *_g .CT_DoughnutChart ;};type Title struct{_cbec *_g .CT_Title };
2022-01-15 21:17:38 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to a Surface chart.
func (_fecg Surface3DChart )AddSeries ()SurfaceChartSeries {_dbfg :=_fecg .nextColor (len (_fecg ._dgb .Ser ));_cac :=_g .NewCT_SurfaceSer ();_fecg ._dgb .Ser =append (_fecg ._dgb .Ser ,_cac );_cac .Idx .ValAttr =uint32 (len (_fecg ._dgb .Ser )-1);_cac .Order .ValAttr =uint32 (len (_fecg ._dgb .Ser )-1);_dbfa :=SurfaceChartSeries {_cac };_dbfa .InitializeDefaults ();_dbfa .Properties ().LineProperties ().SetSolidFill (_dbfg );return _dbfa ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
2022-09-02 11:46:53 +00:00
func (_ced DoughnutChart )InitializeDefaults (){_ced ._fecf .VaryColors =_g .NewCT_Boolean ();_ced ._fecf .VaryColors .ValAttr =_ge .Bool (true );_ced ._fecf .HoleSize =_g .NewCT_HoleSize ();_ced ._fecf .HoleSize .ValAttr =&_g .ST_HoleSize {};_ced ._fecf .HoleSize .ValAttr .ST_HoleSizeUByte =_ge .Uint8 (50);};
2021-05-31 16:22:30 +00:00
2022-09-02 11:46:53 +00:00
// SetDisplayBlanksAs controls how missing values are displayed.
func (_feb Chart )SetDisplayBlanksAs (v _g .ST_DispBlanksAs ){_feb ._gcf .Chart .DispBlanksAs =_g .NewCT_DispBlanksAs ();_feb ._gcf .Chart .DispBlanksAs .ValAttr =v ;};
2020-11-09 01:00:18 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_deae ScatterChart )X ()*_g .CT_ScatterChart {return _deae ._fdcg };
2020-11-09 01:00:18 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_fba BubbleChart )X ()*_g .CT_BubbleChart {return _fba ._egb };func (_cbgc DateAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_cbgc ._acg .MajorTickMark =nil ;}else {_cbgc ._acg .MajorTickMark =_g .NewCT_TickMark ();_cbgc ._acg .MajorTickMark .ValAttr =m ;};};
2017-09-05 20:20:00 -04:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_dgc PieOfPieChart )X ()*_g .CT_OfPieChart {return _dgc ._adc };func (_gbda SeriesAxis )SetCrosses (axis Axis ){_gbda ._ecge .CrossAx .ValAttr =axis .AxisID ()};func (_ddgd LineChartSeries )InitializeDefaults (){_ddgd .Properties ().LineProperties ().SetWidth (1*_fb .Point );_ddgd .Properties ().LineProperties ().SetSolidFill (_fc .Black );_ddgd .Properties ().LineProperties ().SetJoin (_fa .LineJoinRound );_ddgd .Marker ().SetSymbol (_g .ST_MarkerStyleNone );_ddgd .Labels ().SetShowLegendKey (false );_ddgd .Labels ().SetShowValue (false );_ddgd .Labels ().SetShowPercent (false );_ddgd .Labels ().SetShowCategoryName (false );_ddgd .Labels ().SetShowSeriesName (false );_ddgd .Labels ().SetShowLeaderLines (false );};
2017-09-07 12:08:13 -04:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_gab Chart )X ()*_g .ChartSpace {return _gab ._gcf };func MakeSeriesAxis (x *_g .CT_SerAx )SeriesAxis {return SeriesAxis {x }};func (_fdcd CategoryAxis )InitializeDefaults (){_fdcd .SetPosition (_g .ST_AxPosB );_fdcd .SetMajorTickMark (_g .ST_TickMarkOut );_fdcd .SetMinorTickMark (_g .ST_TickMarkIn );_fdcd .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_fdcd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fc .LightGray );_fdcd .Properties ().LineProperties ().SetSolidFill (_fc .Black );};func (_bcbg Title )SetText (s string ){if _bcbg ._cbec .Tx ==nil {_bcbg ._cbec .Tx =_g .NewCT_Tx ();};if _bcbg ._cbec .Tx .Choice .Rich ==nil {_bcbg ._cbec .Tx .Choice .Rich =_b .NewCT_TextBody ();};var _gecb *_b .CT_TextParagraph ;if len (_bcbg ._cbec .Tx .Choice .Rich .P )==0{_gecb =_b .NewCT_TextParagraph ();_bcbg ._cbec .Tx .Choice .Rich .P =[]*_b .CT_TextParagraph {_gecb };}else {_gecb =_bcbg ._cbec .Tx .Choice .Rich .P [0];};var _beec *_b .EG_TextRun ;if len (_gecb .EG_TextRun )==0{_beec =_b .NewEG_TextRun ();_gecb .EG_TextRun =[]*_b .EG_TextRun {_beec };}else {_beec =_gecb .EG_TextRun [0];};if _beec .R ==nil {_beec .R =_b .NewCT_RegularTextRun ();};_beec .R .T =s ;};
2017-09-07 12:08:13 -04:00
2022-09-02 11:46:53 +00:00
// SetText sets the series text.
func (_efgfg RadarChartSeries )SetText (s string ){_efgfg ._gbc .Tx =_g .NewCT_SerTx ();_efgfg ._gbc .Tx .Choice .V =&s ;};
2021-06-16 07:10:52 +00:00
2022-09-02 11:46:53 +00:00
// SetValues is used to set the source data to a set of values.
func (_ag CategoryAxisDataSource )SetValues (v []string ){_ag ._bg .Choice =_g .NewCT_AxDataSourceChoice ();_ag ._bg .Choice .StrLit =_g .NewCT_StrData ();_ag ._bg .Choice .StrLit .PtCount =_g .NewCT_UnsignedInt ();_ag ._bg .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _ffa ,_fcbd :=range v {_ag ._bg .Choice .StrLit .Pt =append (_ag ._bg .Choice .StrLit .Pt ,&_g .CT_StrVal {IdxAttr :uint32 (_ffa ),V :_fcbd });};};
2017-09-06 17:02:21 -04:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to a bar chart.
func (_egg BarChart )AddSeries ()BarChartSeries {_fgdd :=_egg .nextColor (len (_egg ._ec .Ser ));_fdd :=_g .NewCT_BarSer ();_egg ._ec .Ser =append (_egg ._ec .Ser ,_fdd );_fdd .Idx .ValAttr =uint32 (len (_egg ._ec .Ser )-1);_fdd .Order .ValAttr =uint32 (len (_egg ._ec .Ser )-1);_egc :=BarChartSeries {_fdd };_egc .InitializeDefaults ();_egc .Properties ().SetSolidFill (_fgdd );return _egc ;};
2022-06-27 19:44:23 +00:00
2022-09-02 11:46:53 +00:00
// AddPieChart adds a new pie chart to a chart.
func (_gdeb Chart )AddPieChart ()PieChart {_bec :=_g .NewCT_PlotAreaChoice ();_gdeb ._gcf .Chart .PlotArea .Choice =append (_gdeb ._gcf .Chart .PlotArea .Choice ,_bec );_bec .PieChart =_g .NewCT_PieChart ();_acf :=PieChart {_agd :_bec .PieChart };_acf .InitializeDefaults ();return _acf ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// Properties returns the line chart series shape properties.
func (_egdb ScatterChartSeries )Properties ()_fa .ShapeProperties {if _egdb ._fag .SpPr ==nil {_egdb ._fag .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_egdb ._fag .SpPr );};type DataLabels struct{_dca *_g .CT_DLbls };func (_ccbe ValueAxis )SetCrosses (axis Axis ){_ccbe ._bge .CrossAx .ValAttr =axis .AxisID ()};
2017-09-06 17:33:34 -04:00
2022-09-02 11:46:53 +00:00
// AddAxis adds an axis to a Surface chart.
func (_dfg SurfaceChart )AddAxis (axis Axis ){_bce :=_g .NewCT_UnsignedInt ();_bce .ValAttr =axis .AxisID ();_dfg ._edeb .AxId =append (_dfg ._edeb .AxId ,_bce );};
2021-03-16 20:51:18 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults the Stock chart to its defaults
func (_fgeg StockChart )InitializeDefaults (){_fgeg ._gec .HiLowLines =_g .NewCT_ChartLines ();_fgeg ._gec .UpDownBars =_g .NewCT_UpDownBars ();_fgeg ._gec .UpDownBars .GapWidth =_g .NewCT_GapAmount ();_fgeg ._gec .UpDownBars .GapWidth .ValAttr =&_g .ST_GapAmount {};_fgeg ._gec .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_ge .Uint16 (150);_fgeg ._gec .UpDownBars .UpBars =_g .NewCT_UpDownBar ();_fgeg ._gec .UpDownBars .DownBars =_g .NewCT_UpDownBar ();};
2017-09-06 17:33:34 -04:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
2022-09-02 11:46:53 +00:00
func (_afe BubbleChartSeries )Values ()NumberDataSource {if _afe ._bac .YVal ==nil {_afe ._bac .YVal =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_afe ._bac .YVal );};
2021-01-04 16:11:39 +00:00
2022-01-15 21:17:38 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_gcd PieChart )X ()*_g .CT_PieChart {return _gcd ._agd };
2022-02-25 19:20:45 +00:00
2022-09-02 11:46:53 +00:00
// SetDirection changes the direction of the bar chart (bar or column).
func (_aa Bar3DChart )SetDirection (d _g .ST_BarDir ){_aa ._abb .BarDir .ValAttr =d };func (_cde DataLabels )SetShowValue (b bool ){_cde .ensureChoice ();_cde ._dca .Choice .ShowVal =_g .NewCT_Boolean ();_cde ._dca .Choice .ShowVal .ValAttr =_ge .Bool (b );};func MakeNumberDataSource (x *_g .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func MakeValueAxis (x *_g .CT_ValAx )ValueAxis {return ValueAxis {x }};
2022-01-15 21:17:38 +00:00
2022-09-02 11:46:53 +00:00
// 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{_bg *_g .CT_AxDataSource };type chartBase struct{};func (_fed DataLabels )SetShowLeaderLines (b bool ){_fed .ensureChoice ();_fed ._dca .Choice .ShowLeaderLines =_g .NewCT_Boolean ();_fed ._dca .Choice .ShowLeaderLines .ValAttr =_ge .Bool (b );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_cfad RadarChartSeries )X ()*_g .CT_RadarSer {return _cfad ._gbc };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// Order returns the order of the series
func (_fge ScatterChartSeries )Order ()uint32 {return _fge ._fag .Order .ValAttr };
2022-02-05 13:05:36 +00:00
2022-09-02 11:46:53 +00:00
// Order returns the order of the series
func (_gcg LineChartSeries )Order ()uint32 {return _gcg ._fda .Order .ValAttr };
2022-09-02 11:46:53 +00:00
// Properties returns the bar chart series shape properties.
func (_dba PieChartSeries )Properties ()_fa .ShapeProperties {if _dba ._gfg .SpPr ==nil {_dba ._gfg .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_dba ._gfg .SpPr );};func (_dged DateAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_dged ._acg .TickLblPos =nil ;}else {_dged ._acg .TickLblPos =_g .NewCT_TickLblPos ();_dged ._acg .TickLblPos .ValAttr =p ;};};
2021-04-23 20:00:00 +00:00
2022-09-02 11:46:53 +00:00
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_cgg Chart )AddBar3DChart ()Bar3DChart {_dfd (_cgg ._gcf .Chart );_gf :=_g .NewCT_PlotAreaChoice ();_cgg ._gcf .Chart .PlotArea .Choice =append (_cgg ._gcf .Chart .PlotArea .Choice ,_gf );_gf .Bar3DChart =_g .NewCT_Bar3DChart ();_gf .Bar3DChart .Grouping =_g .NewCT_BarGrouping ();_gf .Bar3DChart .Grouping .ValAttr =_g .ST_BarGroupingStandard ;_dee :=Bar3DChart {_abb :_gf .Bar3DChart };_dee .InitializeDefaults ();return _dee ;};
2022-04-09 14:27:46 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to a Bubble chart.
func (_ee BubbleChart )AddSeries ()BubbleChartSeries {_bef :=_ee .nextColor (len (_ee ._egb .Ser ));_ga :=_g .NewCT_BubbleSer ();_ee ._egb .Ser =append (_ee ._egb .Ser ,_ga );_ga .Idx .ValAttr =uint32 (len (_ee ._egb .Ser )-1);_ga .Order .ValAttr =uint32 (len (_ee ._egb .Ser )-1);_gcb :=BubbleChartSeries {_ga };_gcb .InitializeDefaults ();_gcb .Properties ().SetSolidFill (_bef );return _gcb ;};
2022-06-27 19:44:23 +00:00
2022-09-02 11:46:53 +00:00
// SetIndex sets the index of the series
func (_aefa LineChartSeries )SetIndex (idx uint32 ){_aefa ._fda .Idx .ValAttr =idx };func (_eda ValueAxis )MajorGridLines ()GridLines {if _eda ._bge .MajorGridlines ==nil {_eda ._bge .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_eda ._bge .MajorGridlines };};
2022-06-27 19:44:23 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to a line chart.
func (_bafe LineChart )AddSeries ()LineChartSeries {_cef :=_bafe .nextColor (len (_bafe ._fbd .Ser ));_ade :=_g .NewCT_LineSer ();_bafe ._fbd .Ser =append (_bafe ._fbd .Ser ,_ade );_ade .Idx .ValAttr =uint32 (len (_bafe ._fbd .Ser )-1);_ade .Order .ValAttr =uint32 (len (_bafe ._fbd .Ser )-1);_aed :=LineChartSeries {_ade };_aed .InitializeDefaults ();_aed .Properties ().LineProperties ().SetSolidFill (_cef );return _aed ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// SetDirection changes the direction of the bar chart (bar or column).
func (_aaf BarChart )SetDirection (d _g .ST_BarDir ){_aaf ._ec .BarDir .ValAttr =d };
2022-02-05 13:05:36 +00:00
2022-09-02 11:46:53 +00:00
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_fgf PieChartSeries )SetExplosion (v uint32 ){_fgf ._gfg .Explosion =_g .NewCT_UnsignedInt ();_fgf ._gfg .Explosion .ValAttr =v ;};
2022-02-05 13:05:36 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to a Stock chart.
func (_fcbea StockChart )AddSeries ()LineChartSeries {_aafc :=_g .NewCT_LineSer ();_fcbea ._gec .Ser =append (_fcbea ._gec .Ser ,_aafc );_aafc .Idx .ValAttr =uint32 (len (_fcbea ._gec .Ser )-1);_aafc .Order .ValAttr =uint32 (len (_fcbea ._gec .Ser )-1);_agf :=LineChartSeries {_aafc };_agf .Values ().CreateEmptyNumberCache ();_agf .Properties ().LineProperties ().SetNoFill ();return _agf ;};var _fcd =[]_fc .Color {_fc .RGB (0x33,0x66,0xcc),_fc .RGB (0xDC,0x39,0x12),_fc .RGB (0xFF,0x99,0x00),_fc .RGB (0x10,0x96,0x18),_fc .RGB (0x99,0x00,0x99),_fc .RGB (0x3B,0x3E,0xAC),_fc .RGB (0x00,0x99,0xC6),_fc .RGB (0xDD,0x44,0x77),_fc .RGB (0x66,0xAA,0x00),_fc .RGB (0xB8,0x2E,0x2E),_fc .RGB (0x31,0x63,0x95),_fc .RGB (0x99,0x44,0x99),_fc .RGB (0x22,0xAA,0x99),_fc .RGB (0xAA,0xAA,0x11),_fc .RGB (0x66,0x33,0xCC),_fc .RGB (0xE6,0x73,0x00),_fc .RGB (0x8B,0x07,0x07),_fc .RGB (0x32,0x92,0x62),_fc .RGB (0x55,0x74,0xA6),_fc .RGB (0x3B,0x3E,0xAC)};
2022-02-05 13:05:36 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_cca StockChart )X ()*_g .CT_StockChart {return _cca ._gec };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_ad *_g .CT_BarSer };func (_afbd DateAxis )Properties ()_fa .ShapeProperties {if _afbd ._acg .SpPr ==nil {_afbd ._acg .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_afbd ._acg .SpPr );};
2022-06-27 19:44:23 +00:00
2022-09-02 11:46:53 +00:00
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_dfe *_g .CT_RadarChart ;};func (_afde Title )RunProperties ()_fa .RunProperties {if _afde ._cbec .Tx ==nil {_afde .SetText ("");};if _afde ._cbec .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_afde ._cbec .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_b .NewCT_TextCharacterProperties ();};return _fa .MakeRunProperties (_afde ._cbec .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};func (_ffc CategoryAxis )Properties ()_fa .ShapeProperties {if _ffc ._gda .SpPr ==nil {_ffc ._gda .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ffc ._gda .SpPr );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_abbd ScatterChartSeries )X ()*_g .CT_ScatterSer {return _abbd ._fag };func (_bbe StockChart )AddAxis (axis Axis ){_gff :=_g .NewCT_UnsignedInt ();_gff .ValAttr =axis .AxisID ();_bbe ._gec .AxId =append (_bbe ._gec .AxId ,_gff );};
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_fbed Legend )X ()*_g .CT_Legend {return _fbed ._ege };
2022-04-09 14:27:46 +00:00
2022-09-02 11:46:53 +00:00
// AddTitle sets a new title on the chart.
func (_aba Chart )AddTitle ()Title {_aba ._gcf .Chart .Title =_g .NewCT_Title ();_aba ._gcf .Chart .Title .Overlay =_g .NewCT_Boolean ();_aba ._gcf .Chart .Title .Overlay .ValAttr =_ge .Bool (false );_aba ._gcf .Chart .AutoTitleDeleted =_g .NewCT_Boolean ();_aba ._gcf .Chart .AutoTitleDeleted .ValAttr =_ge .Bool (false );_bed :=MakeTitle (_aba ._gcf .Chart .Title );_bed .InitializeDefaults ();return _bed ;};type LineChart struct{chartBase ;_fbd *_g .CT_LineChart ;};func (_fcb CategoryAxis )AxisID ()uint32 {return _fcb ._gda .AxId .ValAttr };
2021-09-22 16:41:01 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults the Bubble chart to its defaults
func (_cga BubbleChart )InitializeDefaults (){};
2021-04-23 20:00:00 +00:00
2022-09-02 11:46:53 +00:00
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_edeb *_g .CT_SurfaceChart ;};
2022-06-27 19:44:23 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_ccfa RadarChart )X ()*_g .CT_RadarChart {return _ccfa ._dfe };func (_ddg GridLines )Properties ()_fa .ShapeProperties {if _ddg ._bcad .SpPr ==nil {_ddg ._bcad .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ddg ._bcad .SpPr );};type Legend struct{_ege *_g .CT_Legend };func (_faa DateAxis )AxisID ()uint32 {return _faa ._acg .AxId .ValAttr };func (_bfgf ValueAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_bfgf ._bge .TickLblPos =nil ;}else {_bfgf ._bge .TickLblPos =_g .NewCT_TickLblPos ();_bfgf ._bge .TickLblPos .ValAttr =p ;};};
2021-01-04 16:11:39 +00:00
2022-09-02 11:46:53 +00:00
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_adc *_g .CT_OfPieChart ;};func (_gd BarChart )AddAxis (axis Axis ){_abf :=_g .NewCT_UnsignedInt ();_abf .ValAttr =axis .AxisID ();_gd ._ec .AxId =append (_gd ._ec .AxId ,_abf );};
2021-01-04 16:11:39 +00:00
2022-09-02 11:46:53 +00:00
// SetText sets the series text
func (_cbe SurfaceChartSeries )SetText (s string ){_cbe ._geff .Tx =_g .NewCT_SerTx ();_cbe ._geff .Tx .Choice .V =&s ;};func (_aefg DataLabels )SetShowPercent (b bool ){_aefg .ensureChoice ();_aefg ._dca .Choice .ShowPercent =_g .NewCT_Boolean ();_aefg ._dca .Choice .ShowPercent .ValAttr =_ge .Bool (b );};
2021-04-23 20:00:00 +00:00
2022-09-02 11:46:53 +00:00
// SetText sets the series text
func (_ffab ScatterChartSeries )SetText (s string ){_ffab ._fag .Tx =_g .NewCT_SerTx ();_ffab ._fag .Tx .Choice .V =&s ;};
2022-04-09 14:27:46 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults initializes an Radar series to the default values.
func (_gcgd RadarChartSeries )InitializeDefaults (){};
2022-06-27 19:44:23 +00:00
// SetIndex sets the index of the series
2022-09-02 11:46:53 +00:00
func (_ebb SurfaceChartSeries )SetIndex (idx uint32 ){_ebb ._geff .Idx .ValAttr =idx };
2021-08-23 20:44:48 +00:00
2022-09-02 11:46:53 +00:00
// Properties returns the line chart series shape properties.
func (_fce LineChartSeries )Properties ()_fa .ShapeProperties {if _fce ._fda .SpPr ==nil {_fce ._fda .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_fce ._fda .SpPr );};func (_cfd Marker )SetSize (sz uint8 ){_cfd ._eee .Size =_g .NewCT_MarkerSize ();_cfd ._eee .Size .ValAttr =&sz ;};
2021-08-23 20:44:48 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults the bar chart to its defaults
func (_afb AreaChart )InitializeDefaults (){};
2022-09-02 11:46:53 +00:00
// Marker returns the marker properties.
func (_cfa LineChartSeries )Marker ()Marker {if _cfa ._fda .Marker ==nil {_cfa ._fda .Marker =_g .NewCT_Marker ();};return MakeMarker (_cfa ._fda .Marker );};
2022-09-02 11:46:53 +00:00
// AddAxis adds an axis to a line chart.
func (_ddbg Line3DChart )AddAxis (axis Axis ){_caeb :=_g .NewCT_UnsignedInt ();_caeb .ValAttr =axis .AxisID ();_ddbg ._dbgc .AxId =append (_ddbg ._dbgc .AxId ,_caeb );};
2022-04-09 14:27:46 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to an Pie3D chart.
func (_afg Pie3DChart )AddSeries ()PieChartSeries {_beb :=_g .NewCT_PieSer ();_afg ._fca .Ser =append (_afg ._fca .Ser ,_beb );_beb .Idx .ValAttr =uint32 (len (_afg ._fca .Ser )-1);_beb .Order .ValAttr =uint32 (len (_afg ._fca .Ser )-1);_ead :=PieChartSeries {_beb };_ead .InitializeDefaults ();return _ead ;};
2022-02-25 19:20:45 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_acd Pie3DChart )X ()*_g .CT_Pie3DChart {return _acd ._fca };
2020-10-12 13:59:12 +00:00
2022-09-02 11:46:53 +00:00
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_gbc *_g .CT_RadarSer };func (_dbb ScatterChart )InitializeDefaults (){_dbb ._fdcg .ScatterStyle .ValAttr =_g .ST_ScatterStyleMarker ;};func (_fd Bar3DChart )AddAxis (axis Axis ){_ffb :=_g .NewCT_UnsignedInt ();_ffb .ValAttr =axis .AxisID ();_fd ._abb .AxId =append (_fd ._abb .AxId ,_ffb );};
2022-02-05 13:05:36 +00:00
2022-09-02 11:46:53 +00:00
// Index returns the index of the series
func (_ecd ScatterChartSeries )Index ()uint32 {return _ecd ._fag .Idx .ValAttr };
2022-02-05 13:05:36 +00:00
2022-09-02 11:46:53 +00:00
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_fag *_g .CT_ScatterSer };
2021-08-23 20:44:48 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults the bar chart to its defaults
func (_gca PieChart )InitializeDefaults (){_gca ._agd .VaryColors =_g .NewCT_Boolean ();_gca ._agd .VaryColors .ValAttr =_ge .Bool (true );};
2021-08-23 20:44:48 +00:00
2022-09-02 11:46:53 +00:00
// AddAxis adds an axis to a Surface chart.
func (_dgeg Surface3DChart )AddAxis (axis Axis ){_gaa :=_g .NewCT_UnsignedInt ();_gaa .ValAttr =axis .AxisID ();_dgeg ._dgb .AxId =append (_dgeg ._dgb .AxId ,_gaa );};
2022-09-02 11:46:53 +00:00
// CategoryAxis returns the category data source.
func (_cgac RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cgac ._gbc .Cat ==nil {_cgac ._gbc .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_cgac ._gbc .Cat );};func (_efgf Legend )InitializeDefaults (){_efgf .SetPosition (_g .ST_LegendPosR );_efgf .SetOverlay (false );_efgf .Properties ().SetNoFill ();_efgf .Properties ().LineProperties ().SetNoFill ();};
2022-09-02 11:46:53 +00:00
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_gbd Chart )AddSurface3DChart ()Surface3DChart {_ecc :=_g .NewCT_PlotAreaChoice ();_gbd ._gcf .Chart .PlotArea .Choice =append (_gbd ._gcf .Chart .PlotArea .Choice ,_ecc );_ecc .Surface3DChart =_g .NewCT_Surface3DChart ();_dfd (_gbd ._gcf .Chart );_eec :=Surface3DChart {_dgb :_ecc .Surface3DChart };_eec .InitializeDefaults ();return _eec ;};
2021-06-16 07:10:52 +00:00
2022-09-02 11:46:53 +00:00
// Values returns the value data source.
func (_bfd BarChartSeries )Values ()NumberDataSource {if _bfd ._ad .Val ==nil {_bfd ._ad .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_bfd ._ad .Val );};func (_cgc DataLabels )SetPosition (p _g .ST_DLblPos ){_cgc .ensureChoice ();_cgc ._dca .Choice .DLblPos =_g .NewCT_DLblPos ();_cgc ._dca .Choice .DLblPos .ValAttr =p ;};
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
2022-09-02 11:46:53 +00:00
func (_eba BarChart )InitializeDefaults (){_eba .SetDirection (_g .ST_BarDirCol )};
// RemoveTitle removes any existing title from the chart.
func (_gdef Chart )RemoveTitle (){_gdef ._gcf .Chart .Title =nil ;_gdef ._gcf .Chart .AutoTitleDeleted =_g .NewCT_Boolean ();_gdef ._gcf .Chart .AutoTitleDeleted .ValAttr =_ge .Bool (true );};func MakeMarker (x *_g .CT_Marker )Marker {return Marker {x }};func (_beeg ScatterChartSeries )Values ()NumberDataSource {if _beeg ._fag .YVal ==nil {_beeg ._fag .YVal =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_beeg ._fag .YVal );};func (_bad RadarChart )AddAxis (axis Axis ){_eag :=_g .NewCT_UnsignedInt ();_eag .ValAttr =axis .AxisID ();_bad ._dfe .AxId =append (_bad ._dfe .AxId ,_eag );};
2022-06-27 19:44:23 +00:00
// Index returns the index of the series
2022-09-02 11:46:53 +00:00
func (_cdf LineChartSeries )Index ()uint32 {return _cdf ._fda .Idx .ValAttr };func (_dg CategoryAxis )SetCrosses (axis Axis ){_dg ._gda .Choice =_g .NewEG_AxSharedChoice ();_dg ._gda .Choice .Crosses =_g .NewCT_Crosses ();_dg ._gda .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_dg ._gda .CrossAx .ValAttr =axis .AxisID ();};func (_degc Title )ParagraphProperties ()_fa .ParagraphProperties {if _degc ._cbec .Tx ==nil {_degc .SetText ("");};if _degc ._cbec .Tx .Choice .Rich .P [0].PPr ==nil {_degc ._cbec .Tx .Choice .Rich .P [0].PPr =_b .NewCT_TextParagraphProperties ();};return _fa .MakeParagraphProperties (_degc ._cbec .Tx .Choice .Rich .P [0].PPr );};
// SetText sets the series text.
func (_cf AreaChartSeries )SetText (s string ){_cf ._afa .Tx =_g .NewCT_SerTx ();_cf ._afa .Tx .Choice .V =&s ;};
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_abb *_g .CT_Bar3DChart ;};
2021-09-22 16:41:01 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_gdc PieChartSeries )X ()*_g .CT_PieSer {return _gdc ._gfg };func (_gfc DateAxis )MajorGridLines ()GridLines {if _gfc ._acg .MajorGridlines ==nil {_gfc ._acg .MajorGridlines =_g .NewCT_ChartLines ();};return GridLines {_gfc ._acg .MajorGridlines };};
2021-05-31 16:22:30 +00:00
2022-09-02 11:46:53 +00:00
// AddStockChart adds a new stock chart.
func (_cfg Chart )AddStockChart ()StockChart {_cae :=_g .NewCT_PlotAreaChoice ();_cfg ._gcf .Chart .PlotArea .Choice =append (_cfg ._gcf .Chart .PlotArea .Choice ,_cae );_cae .StockChart =_g .NewCT_StockChart ();_baf :=StockChart {_gec :_cae .StockChart };_baf .InitializeDefaults ();return _baf ;};func (_cfgd SurfaceChart )InitializeDefaults (){_cfgd ._edeb .Wireframe =_g .NewCT_Boolean ();_cfgd ._edeb .Wireframe .ValAttr =_ge .Bool (false );_cfgd ._edeb .BandFmts =_g .NewCT_BandFmts ();for _efd :=0;_efd < 15;_efd ++{_ceag :=_g .NewCT_BandFmt ();_ceag .Idx .ValAttr =uint32 (_efd );_ceag .SpPr =_b .NewCT_ShapeProperties ();_fdce :=_fa .MakeShapeProperties (_ceag .SpPr );_fdce .SetSolidFill (_cfgd .nextColor (_efd ));_cfgd ._edeb .BandFmts .BandFmt =append (_cfgd ._edeb .BandFmts .BandFmt ,_ceag );};};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to an Pie chart.
func (_geg PieOfPieChart )AddSeries ()PieChartSeries {_bfgd :=_g .NewCT_PieSer ();_geg ._adc .Ser =append (_geg ._adc .Ser ,_bfgd );_bfgd .Idx .ValAttr =uint32 (len (_geg ._adc .Ser )-1);_bfgd .Order .ValAttr =uint32 (len (_geg ._adc .Ser )-1);_befag :=PieChartSeries {_bfgd };_befag .InitializeDefaults ();return _befag ;};func (_fbe Chart )AddSeriesAxis ()SeriesAxis {_dbf :=_g .NewCT_SerAx ();if _fbe ._gcf .Chart .PlotArea .CChoice ==nil {_fbe ._gcf .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_dbf .AxId =_g .NewCT_UnsignedInt ();_dbf .AxId .ValAttr =0x7FFFFFFF&_a .Uint32 ();_fbe ._gcf .Chart .PlotArea .CChoice .SerAx =append (_fbe ._gcf .Chart .PlotArea .CChoice .SerAx ,_dbf );_dbf .Delete =_g .NewCT_Boolean ();_dbf .Delete .ValAttr =_ge .Bool (false );_bfdd :=MakeSeriesAxis (_dbf );_bfdd .InitializeDefaults ();return _bfdd ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddScatterChart adds a scatter (X/Y) chart.
func (_dfb Chart )AddScatterChart ()ScatterChart {_efg :=_g .NewCT_PlotAreaChoice ();_dfb ._gcf .Chart .PlotArea .Choice =append (_dfb ._gcf .Chart .PlotArea .Choice ,_efg );_efg .ScatterChart =_g .NewCT_ScatterChart ();_cba :=ScatterChart {_fdcg :_efg .ScatterChart };_cba .InitializeDefaults ();return _cba ;};
2021-08-23 20:44:48 +00:00
2022-09-02 11:46:53 +00:00
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_dgb *_g .CT_Surface3DChart ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_fec BubbleChartSeries )InitializeDefaults (){};
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_e *_g .CT_Area3DChart ;};
2020-11-09 01:00:18 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_adb ValueAxis )X ()*_g .CT_ValAx {return _adb ._bge };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_agd *_g .CT_PieChart ;};func (_dae NumberDataSource )ensureChoice (){if _dae ._dce .Choice ==nil {_dae ._dce .Choice =_g .NewCT_NumDataSourceChoice ();};};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_fca *_g .CT_Pie3DChart ;};func (_fbdf LineChartSeries )SetSmooth (b bool ){_fbdf ._fda .Smooth =_g .NewCT_Boolean ();_fbdf ._fda .Smooth .ValAttr =&b ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// Labels returns the data label properties.
func (_cgaa ScatterChartSeries )Labels ()DataLabels {if _cgaa ._fag .DLbls ==nil {_cgaa ._fag .DLbls =_g .NewCT_DLbls ();};return MakeDataLabels (_cgaa ._fag .DLbls );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to a line chart.
func (_abde Line3DChart )AddSeries ()LineChartSeries {_deg :=_abde .nextColor (len (_abde ._dbgc .Ser ));_edec :=_g .NewCT_LineSer ();_abde ._dbgc .Ser =append (_abde ._dbgc .Ser ,_edec );_edec .Idx .ValAttr =uint32 (len (_abde ._dbgc .Ser )-1);_edec .Order .ValAttr =uint32 (len (_abde ._dbgc .Ser )-1);_ecg :=LineChartSeries {_edec };_ecg .InitializeDefaults ();_ecg .Properties ().LineProperties ().SetSolidFill (_deg );_ecg .Properties ().SetSolidFill (_deg );return _ecg ;};
2022-01-15 21:17:38 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to a bar chart.
func (_df Bar3DChart )AddSeries ()BarChartSeries {_fgc :=_df .nextColor (len (_df ._abb .Ser ));_ca :=_g .NewCT_BarSer ();_df ._abb .Ser =append (_df ._abb .Ser ,_ca );_ca .Idx .ValAttr =uint32 (len (_df ._abb .Ser )-1);_ca .Order .ValAttr =uint32 (len (_df ._abb .Ser )-1);_da :=BarChartSeries {_ca };_da .InitializeDefaults ();_da .Properties ().SetSolidFill (_fgc );return _da ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddLine3DChart adds a new 3D line chart to a chart.
func (_gb Chart )AddLine3DChart ()Line3DChart {_dfd (_gb ._gcf .Chart );_bcc :=_g .NewCT_PlotAreaChoice ();_gb ._gcf .Chart .PlotArea .Choice =append (_gb ._gcf .Chart .PlotArea .Choice ,_bcc );_bcc .Line3DChart =_g .NewCT_Line3DChart ();_bcc .Line3DChart .Grouping =_g .NewCT_Grouping ();_bcc .Line3DChart .Grouping .ValAttr =_g .ST_GroupingStandard ;return Line3DChart {_dbgc :_bcc .Line3DChart };};type DateAxis struct{_acg *_g .CT_DateAx };func (_fe BubbleChart )AddAxis (axis Axis ){_afae :=_g .NewCT_UnsignedInt ();_afae .ValAttr =axis .AxisID ();_fe ._egb .AxId =append (_fe ._egb .AxId ,_afae );};
2021-03-16 20:51:18 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_ba Area3DChart )X ()*_g .CT_Area3DChart {return _ba ._e };func (_cgcd LineChartSeries )Values ()NumberDataSource {if _cgcd ._fda .Val ==nil {_cgcd ._fda .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_cgcd ._fda .Val );};
2020-11-09 01:00:18 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_fac DoughnutChart )X ()*_g .CT_DoughnutChart {return _fac ._fecf };type NumberDataSource struct{_dce *_g .CT_NumDataSource };
2021-08-23 20:44:48 +00:00
2022-09-02 11:46:53 +00:00
// RemoveLegend removes the legend if the chart has one.
func (_dga Chart )RemoveLegend (){_dga ._gcf .Chart .Legend =nil };
2020-11-09 01:00:18 +00:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
2022-09-02 11:46:53 +00:00
func (_bf AreaChartSeries )Values ()NumberDataSource {if _bf ._afa .Val ==nil {_bf ._afa .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_bf ._afa .Val );};
// AddSeries adds a default series to an area chart.
func (_dec AreaChart )AddSeries ()AreaChartSeries {_eg :=_dec .nextColor (len (_dec ._ab .Ser ));_ce :=_g .NewCT_AreaSer ();_dec ._ab .Ser =append (_dec ._ab .Ser ,_ce );_ce .Idx .ValAttr =uint32 (len (_dec ._ab .Ser )-1);_ce .Order .ValAttr =uint32 (len (_dec ._ab .Ser )-1);_ff :=AreaChartSeries {_ce };_ff .InitializeDefaults ();_ff .Properties ().SetSolidFill (_eg );return _ff ;};func (_fagd ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fagd ._fag .XVal ==nil {_fagd ._fag .XVal =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_fagd ._fag .XVal );};func (_befa Legend )SetOverlay (b bool ){_befa ._ege .Overlay =_g .NewCT_Boolean ();_befa ._ege .Overlay .ValAttr =_ge .Bool (b );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to an Pie chart.
2022-09-02 11:46:53 +00:00
func (_abe PieChart )AddSeries ()PieChartSeries {_fcbc :=_g .NewCT_PieSer ();_abe ._agd .Ser =append (_abe ._agd .Ser ,_fcbc );_fcbc .Idx .ValAttr =uint32 (len (_abe ._agd .Ser )-1);_fcbc .Order .ValAttr =uint32 (len (_abe ._agd .Ser )-1);_fbae :=PieChartSeries {_fcbc };_fbae .InitializeDefaults ();return _fbae ;};func MakeDataLabels (x *_g .CT_DLbls )DataLabels {return DataLabels {x }};
2021-04-23 20:00:00 +00:00
2022-09-02 11:46:53 +00:00
// Properties returns the bar chart series shape properties.
func (_ef AreaChartSeries )Properties ()_fa .ShapeProperties {if _ef ._afa .SpPr ==nil {_ef ._afa .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ef ._afa .SpPr );};func (_bde DataLabels )SetShowSeriesName (b bool ){_bde .ensureChoice ();_bde ._dca .Choice .ShowSerName =_g .NewCT_Boolean ();_bde ._dca .Choice .ShowSerName .ValAttr =_ge .Bool (b );};type SurfaceChartSeries struct{_geff *_g .CT_SurfaceSer };func (_af Area3DChart )AddAxis (axis Axis ){_gg :=_g .NewCT_UnsignedInt ();_gg .ValAttr =axis .AxisID ();_af ._e .AxId =append (_af ._e .AxId ,_gg );};
2020-11-09 01:00:18 +00:00
2022-09-02 11:46:53 +00:00
// AddLineChart adds a new line chart to a chart.
func (_ede Chart )AddLineChart ()LineChart {_baa :=_g .NewCT_PlotAreaChoice ();_ede ._gcf .Chart .PlotArea .Choice =append (_ede ._gcf .Chart .PlotArea .Choice ,_baa );_baa .LineChart =_g .NewCT_LineChart ();_baa .LineChart .Grouping =_g .NewCT_Grouping ();_baa .LineChart .Grouping .ValAttr =_g .ST_GroupingStandard ;return LineChart {_fbd :_baa .LineChart };};
// AddSeries adds a default series to an Radar chart.
func (_abg RadarChart )AddSeries ()RadarChartSeries {_cbbb :=_abg .nextColor (len (_abg ._dfe .Ser ));_abgf :=_g .NewCT_RadarSer ();_abg ._dfe .Ser =append (_abg ._dfe .Ser ,_abgf );_abgf .Idx .ValAttr =uint32 (len (_abg ._dfe .Ser )-1);_abgf .Order .ValAttr =uint32 (len (_abg ._dfe .Ser )-1);_aae :=RadarChartSeries {_abgf };_aae .InitializeDefaults ();_aae .Properties ().SetSolidFill (_cbbb );return _aae ;};func (_gea ValueAxis )AxisID ()uint32 {return _gea ._bge .AxId .ValAttr };func (_ccaf ValueAxis )Properties ()_fa .ShapeProperties {if _ccaf ._bge .SpPr ==nil {_ccaf ._bge .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ccaf ._bge .SpPr );};
// AddSeries adds a default series to a Scatter chart.
func (_gag ScatterChart )AddSeries ()ScatterChartSeries {_eddf :=_gag .nextColor (len (_gag ._fdcg .Ser ));_egda :=_g .NewCT_ScatterSer ();_gag ._fdcg .Ser =append (_gag ._fdcg .Ser ,_egda );_egda .Idx .ValAttr =uint32 (len (_gag ._fdcg .Ser )-1);_egda .Order .ValAttr =uint32 (len (_gag ._fdcg .Ser )-1);_eedg :=ScatterChartSeries {_egda };_eedg .InitializeDefaults ();_eedg .Marker ().Properties ().LineProperties ().SetSolidFill (_eddf );_eedg .Marker ().Properties ().SetSolidFill (_eddf );return _eedg ;};
2021-09-22 16:41:01 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_c AreaChart )X ()*_g .CT_AreaChart {return _c ._ab };
2022-06-27 19:44:23 +00:00
2022-09-02 11:46:53 +00:00
// Chart is a generic chart.
type Chart struct{_gcf *_g .ChartSpace };
2020-08-23 14:15:53 +00:00
2022-02-05 13:05:36 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_becg Line3DChart )X ()*_g .CT_Line3DChart {return _becg ._dbgc };
2020-10-12 13:59:12 +00:00
2022-09-02 11:46:53 +00:00
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_gec *_g .CT_StockChart ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// Properties returns the Bubble chart series shape properties.
func (_dea BubbleChartSeries )Properties ()_fa .ShapeProperties {if _dea ._bac .SpPr ==nil {_dea ._bac .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_dea ._bac .SpPr );};
2020-10-12 13:59:12 +00:00
2022-09-02 11:46:53 +00:00
// CategoryAxis returns the category data source.
func (_adg BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _adg ._ad .Cat ==nil {_adg ._ad .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_adg ._ad .Cat );};func (_aac ScatterChartSeries )SetSmooth (b bool ){_aac ._fag .Smooth =_g .NewCT_Boolean ();_aac ._fag .Smooth .ValAttr =&b ;};
2022-02-25 19:20:45 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to a Surface chart.
func (_fgdc SurfaceChart )AddSeries ()SurfaceChartSeries {_bbc :=_fgdc .nextColor (len (_fgdc ._edeb .Ser ));_eef :=_g .NewCT_SurfaceSer ();_fgdc ._edeb .Ser =append (_fgdc ._edeb .Ser ,_eef );_eef .Idx .ValAttr =uint32 (len (_fgdc ._edeb .Ser )-1);_eef .Order .ValAttr =uint32 (len (_fgdc ._edeb .Ser )-1);_ggf :=SurfaceChartSeries {_eef };_ggf .InitializeDefaults ();_ggf .Properties ().LineProperties ().SetSolidFill (_bbc );return _ggf ;};func (_eca Marker )Properties ()_fa .ShapeProperties {if _eca ._eee .SpPr ==nil {_eca ._eee .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_eca ._eee .SpPr );};func (_egbe SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _egbe ._geff .Cat ==nil {_egbe ._geff .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_egbe ._geff .Cat );};
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
2022-09-02 11:46:53 +00:00
func (_ecb RadarChartSeries )Values ()NumberDataSource {if _ecb ._gbc .Val ==nil {_ecb ._gbc .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_ecb ._gbc .Val );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_g .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddDateAxis adds a value axis to the chart.
func (_bfe Chart )AddDateAxis ()DateAxis {_cee :=_g .NewCT_DateAx ();if _bfe ._gcf .Chart .PlotArea .CChoice ==nil {_bfe ._gcf .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_cee .AxId =_g .NewCT_UnsignedInt ();_cee .AxId .ValAttr =0x7FFFFFFF&_a .Uint32 ();_bfe ._gcf .Chart .PlotArea .CChoice .DateAx =append (_bfe ._gcf .Chart .PlotArea .CChoice .DateAx ,_cee );_cee .Delete =_g .NewCT_Boolean ();_cee .Delete .ValAttr =_ge .Bool (false );_cee .Scaling =_g .NewCT_Scaling ();_cee .Scaling .Orientation =_g .NewCT_Orientation ();_cee .Scaling .Orientation .ValAttr =_g .ST_OrientationMinMax ;_cee .Choice =&_g .EG_AxSharedChoice {};_cee .Choice .Crosses =_g .NewCT_Crosses ();_cee .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_bfg :=DateAxis {_cee };_bfg .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fc .LightGray );_bfg .SetMajorTickMark (_g .ST_TickMarkOut );_bfg .SetMinorTickMark (_g .ST_TickMarkIn );_bfg .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_bfg .Properties ().LineProperties ().SetSolidFill (_fc .Black );_bfg .SetPosition (_g .ST_AxPosL );return _bfg ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddRadarChart adds a new radar chart to a chart.
func (_dece Chart )AddRadarChart ()RadarChart {_dge :=_g .NewCT_PlotAreaChoice ();_dece ._gcf .Chart .PlotArea .Choice =append (_dece ._gcf .Chart .PlotArea .Choice ,_dge );_dge .RadarChart =_g .NewCT_RadarChart ();_aef :=RadarChart {_dfe :_dge .RadarChart };_aef .InitializeDefaults ();return _aef ;};func (_gceb SurfaceChartSeries )InitializeDefaults (){_gceb .Properties ().LineProperties ().SetWidth (1*_fb .Point );_gceb .Properties ().LineProperties ().SetSolidFill (_fc .Black );_gceb .Properties ().LineProperties ().SetJoin (_fa .LineJoinRound );};func (_afec chartBase )nextColor (_faf int )_fc .Color {return _fcd [_faf %len (_fcd )]};func MakeLegend (l *_g .CT_Legend )Legend {return Legend {l }};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_afa *_g .CT_AreaSer };func (_egd Legend )SetPosition (p _g .ST_LegendPos ){if p ==_g .ST_LegendPosUnset {_egd ._ege .LegendPos =nil ;}else {_egd ._ege .LegendPos =_g .NewCT_LegendPos ();_egd ._ege .LegendPos .ValAttr =p ;};};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_deab Marker )X ()*_g .CT_Marker {return _deab ._eee };type nullAxis byte ;func (_aafa CategoryAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_aafa ._gda .MinorTickMark =nil ;}else {_aafa ._gda .MinorTickMark =_g .NewCT_TickMark ();_aafa ._gda .MinorTickMark .ValAttr =m ;};};func (_ggg NumberDataSource )SetReference (s string ){_ggg .ensureChoice ();if _ggg ._dce .Choice .NumRef ==nil {_ggg ._dce .Choice .NumRef =_g .NewCT_NumRef ();};_ggg ._dce .Choice .NumRef .F =s ;};func _dfd (_fbc *_g .CT_Chart ){_fbc .View3D =_g .NewCT_View3D ();_fbc .View3D .RotX =_g .NewCT_RotX ();_fbc .View3D .RotX .ValAttr =_ge .Int8 (15);_fbc .View3D .RotY =_g .NewCT_RotY ();_fbc .View3D .RotY .ValAttr =_ge .Uint16 (20);_fbc .View3D .RAngAx =_g .NewCT_Boolean ();_fbc .View3D .RAngAx .ValAttr =_ge .Bool (false );_fbc .Floor =_g .NewCT_Surface ();_fbc .Floor .Thickness =_g .NewCT_Thickness ();_fbc .Floor .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);_fbc .SideWall =_g .NewCT_Surface ();_fbc .SideWall .Thickness =_g .NewCT_Thickness ();_fbc .SideWall .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);_fbc .BackWall =_g .NewCT_Surface ();_fbc .BackWall .Thickness =_g .NewCT_Thickness ();_fbc .BackWall .Thickness .ValAttr .Uint32 =_ge .Uint32 (0);};
2021-05-31 16:22:30 +00:00
2022-09-02 11:46:53 +00:00
// Properties returns the line chart series shape properties.
func (_bcbb SurfaceChartSeries )Properties ()_fa .ShapeProperties {if _bcbb ._geff .SpPr ==nil {_bcbb ._geff .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_bcbb ._geff .SpPr );};func (_ed CategoryAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_ed ._gda .MajorTickMark =nil ;}else {_ed ._gda .MajorTickMark =_g .NewCT_TickMark ();_ed ._gda .MajorTickMark .ValAttr =m ;};};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddValueAxis adds a value axis to the chart.
func (_eaf Chart )AddValueAxis ()ValueAxis {_ded :=_g .NewCT_ValAx ();if _eaf ._gcf .Chart .PlotArea .CChoice ==nil {_eaf ._gcf .Chart .PlotArea .CChoice =_g .NewCT_PlotAreaChoice1 ();};_ded .AxId =_g .NewCT_UnsignedInt ();_ded .AxId .ValAttr =0x7FFFFFFF&_a .Uint32 ();_eaf ._gcf .Chart .PlotArea .CChoice .ValAx =append (_eaf ._gcf .Chart .PlotArea .CChoice .ValAx ,_ded );_ded .Delete =_g .NewCT_Boolean ();_ded .Delete .ValAttr =_ge .Bool (false );_ded .Scaling =_g .NewCT_Scaling ();_ded .Scaling .Orientation =_g .NewCT_Orientation ();_ded .Scaling .Orientation .ValAttr =_g .ST_OrientationMinMax ;_ded .Choice =&_g .EG_AxSharedChoice {};_ded .Choice .Crosses =_g .NewCT_Crosses ();_ded .Choice .Crosses .ValAttr =_g .ST_CrossesAutoZero ;_ded .CrossBetween =_g .NewCT_CrossBetween ();_ded .CrossBetween .ValAttr =_g .ST_CrossBetweenBetween ;_cd :=MakeValueAxis (_ded );_cd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fc .LightGray );_cd .SetMajorTickMark (_g .ST_TickMarkOut );_cd .SetMinorTickMark (_g .ST_TickMarkIn );_cd .SetTickLabelPosition (_g .ST_TickLblPosNextTo );_cd .Properties ().LineProperties ().SetSolidFill (_fc .Black );_cd .SetPosition (_g .ST_AxPosL );return _cd ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
2022-09-02 11:46:53 +00:00
func (_efe PieChartSeries )Values ()NumberDataSource {if _efe ._gfg .Val ==nil {_efe ._gfg .Val =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_efe ._gfg .Val );};func (_cg AreaChart )AddAxis (axis Axis ){_gc :=_g .NewCT_UnsignedInt ();_gc .ValAttr =axis .AxisID ();_cg ._ab .AxId =append (_cg ._ab .AxId ,_gc );};
2022-04-09 14:27:46 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults the bar chart to its defaults
func (_afba Bar3DChart )InitializeDefaults (){_afba .SetDirection (_g .ST_BarDirCol )};func (_ddf DataLabels )SetShowLegendKey (b bool ){_ddf .ensureChoice ();_ddf ._dca .Choice .ShowLegendKey =_g .NewCT_Boolean ();_ddf ._dca .Choice .ShowLegendKey .ValAttr =_ge .Bool (b );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// SetOrder sets the order of the series
func (_bga SurfaceChartSeries )SetOrder (idx uint32 ){_bga ._geff .Order .ValAttr =idx };func (_deee SurfaceChartSeries )Values ()NumberDataSource {if _deee ._geff .Val ==nil {_deee ._geff .Val =_g .NewCT_NumDataSource ();};_daa :=MakeNumberDataSource (_deee ._geff .Val );_daa .CreateEmptyNumberCache ();return _daa ;};
2022-04-09 14:27:46 +00:00
2022-09-02 11:46:53 +00:00
// SetOrder sets the order of the series
func (_ffg ScatterChartSeries )SetOrder (idx uint32 ){_ffg ._fag .Order .ValAttr =idx };type ValueAxis struct{_bge *_g .CT_ValAx };
2022-04-09 14:27:46 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults initializes an area series to the default values.
func (_bc AreaChartSeries )InitializeDefaults (){};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddPie3DChart adds a new pie chart to a chart.
func (_gfb Chart )AddPie3DChart ()Pie3DChart {_dfd (_gfb ._gcf .Chart );_edb :=_g .NewCT_PlotAreaChoice ();_gfb ._gcf .Chart .PlotArea .Choice =append (_gfb ._gcf .Chart .PlotArea .Choice ,_edb );_edb .Pie3DChart =_g .NewCT_Pie3DChart ();_cea :=Pie3DChart {_fca :_edb .Pie3DChart };_cea .InitializeDefaults ();return _cea ;};func (_fgg Marker )SetSymbol (s _g .ST_MarkerStyle ){if s ==_g .ST_MarkerStyleUnset {_fgg ._eee .Symbol =nil ;}else {_fgg ._eee .Symbol =_g .NewCT_MarkerStyle ();_fgg ._eee .Symbol .ValAttr =s ;};};func (_fcf ValueAxis )SetMajorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_fcf ._bge .MajorTickMark =nil ;}else {_fcf ._bge .MajorTickMark =_g .NewCT_TickMark ();_fcf ._bge .MajorTickMark .ValAttr =m ;};};var NullAxis Axis =nullAxis (0);
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddAxis adds an axis to a Scatter chart.
func (_edg ScatterChart )AddAxis (axis Axis ){_ega :=_g .NewCT_UnsignedInt ();_ega .ValAttr =axis .AxisID ();_edg ._fdcg .AxId =append (_edg ._fdcg .AxId ,_ega );};
2022-02-25 19:20:45 +00:00
2022-09-02 11:46:53 +00:00
// CategoryAxis returns the category data source.
func (_bag AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bag ._afa .Cat ==nil {_bag ._afa .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_bag ._afa .Cat );};func MakeCategoryAxis (x *_g .CT_CatAx )CategoryAxis {return CategoryAxis {x }};func (_bee DateAxis )SetPosition (p _g .ST_AxPos ){_bee ._acg .AxPos =_g .NewCT_AxPos ();_bee ._acg .AxPos .ValAttr =p ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_abge SurfaceChartSeries )X ()*_g .CT_SurfaceSer {return _abge ._geff };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_ec *_g .CT_BarChart ;};func (_cb CategoryAxis )SetTickLabelPosition (p _g .ST_TickLblPos ){if p ==_g .ST_TickLblPosUnset {_cb ._gda .TickLblPos =nil ;}else {_cb ._gda .TickLblPos =_g .NewCT_TickLblPos ();_cb ._gda .TickLblPos .ValAttr =p ;};};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// SetValues sets values directly on a source.
func (_bgc NumberDataSource )SetValues (v []float64 ){_bgc .ensureChoice ();_bgc ._dce .Choice .NumRef =nil ;_bgc ._dce .Choice .NumLit =_g .NewCT_NumData ();_bgc ._dce .Choice .NumLit .PtCount =_g .NewCT_UnsignedInt ();_bgc ._dce .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _eggd ,_cfdb :=range v {_bgc ._dce .Choice .NumLit .Pt =append (_bgc ._dce .Choice .NumLit .Pt ,&_g .CT_NumVal {IdxAttr :uint32 (_eggd ),V :_f .Sprintf ("\u0025\u0067",_cfdb )});};};
2021-03-16 20:51:18 +00:00
2022-09-02 11:46:53 +00:00
// AddSurfaceChart adds a new surface chart to a chart.
func (_bca Chart )AddSurfaceChart ()SurfaceChart {_ebc :=_g .NewCT_PlotAreaChoice ();_bca ._gcf .Chart .PlotArea .Choice =append (_bca ._gcf .Chart .PlotArea .Choice ,_ebc );_ebc .SurfaceChart =_g .NewCT_SurfaceChart ();_dfd (_bca ._gcf .Chart );_bca ._gcf .Chart .View3D .RotX .ValAttr =_ge .Int8 (90);_bca ._gcf .Chart .View3D .RotY .ValAttr =_ge .Uint16 (0);_bca ._gcf .Chart .View3D .Perspective =_g .NewCT_Perspective ();_bca ._gcf .Chart .View3D .Perspective .ValAttr =_ge .Uint8 (0);_aca :=SurfaceChart {_edeb :_ebc .SurfaceChart };_aca .InitializeDefaults ();return _aca ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// SetIndex sets the index of the series
func (_cbc ScatterChartSeries )SetIndex (idx uint32 ){_cbc ._fag .Idx .ValAttr =idx };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_aff DoughnutChart )SetHoleSize (pct uint8 ){if _aff ._fecf .HoleSize ==nil {_aff ._fecf .HoleSize =_g .NewCT_HoleSize ();};if _aff ._fecf .HoleSize .ValAttr ==nil {_aff ._fecf .HoleSize .ValAttr =&_g .ST_HoleSize {};};_aff ._fecf .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};
2022-02-25 19:20:45 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults initializes an Pie series to the default values.
func (_ccf PieChartSeries )InitializeDefaults (){};
2022-02-25 19:20:45 +00:00
2022-09-02 11:46:53 +00:00
// SetOrder sets the order of the series
func (_ebad LineChartSeries )SetOrder (idx uint32 ){_ebad ._fda .Order .ValAttr =idx };
2020-08-31 22:58:25 +00:00
2022-09-02 11:46:53 +00:00
// SetText sets the series text.
func (_egcf BarChartSeries )SetText (s string ){_egcf ._ad .Tx =_g .NewCT_SerTx ();_egcf ._ad .Tx .Choice .V =&s ;};
2020-08-31 22:58:25 +00:00
2022-09-02 11:46:53 +00:00
// Marker returns the marker properties.
func (_bafg ScatterChartSeries )Marker ()Marker {if _bafg ._fag .Marker ==nil {_bafg ._fag .Marker =_g .NewCT_Marker ();};return MakeMarker (_bafg ._fag .Marker );};func (_ece Legend )Properties ()_fa .ShapeProperties {if _ece ._ege .SpPr ==nil {_ece ._ege .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_ece ._ege .SpPr );};
2020-12-17 22:07:08 +00:00
2022-09-02 11:46:53 +00:00
// AddAxis adds an axis to a line chart.
func (_ecf LineChart )AddAxis (axis Axis ){_eafc :=_g .NewCT_UnsignedInt ();_eafc .ValAttr =axis .AxisID ();_ecf ._fbd .AxId =append (_ecf ._fbd .AxId ,_eafc );};
2020-12-17 22:07:08 +00:00
2022-09-02 11:46:53 +00:00
// Properties returns the bar chart series shape properties.
func (_aga RadarChartSeries )Properties ()_fa .ShapeProperties {if _aga ._gbc .SpPr ==nil {_aga ._gbc .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_aga ._gbc .SpPr );};
// 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 (_eggg NumberDataSource )CreateEmptyNumberCache (){_eggg .ensureChoice ();if _eggg ._dce .Choice .NumRef ==nil {_eggg ._dce .Choice .NumRef =_g .NewCT_NumRef ();};_eggg ._dce .Choice .NumLit =nil ;_eggg ._dce .Choice .NumRef .NumCache =_g .NewCT_NumData ();_eggg ._dce .Choice .NumRef .NumCache .PtCount =_g .NewCT_UnsignedInt ();_eggg ._dce .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
2020-08-23 14:15:53 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_eed LineChartSeries )X ()*_g .CT_LineSer {return _eed ._fda };
2021-01-04 16:11:39 +00:00
2022-09-02 11:46:53 +00:00
// Values returns the bubble size data source.
func (_db BubbleChartSeries )BubbleSizes ()NumberDataSource {if _db ._bac .BubbleSize ==nil {_db ._bac .BubbleSize =_g .NewCT_NumDataSource ();};return MakeNumberDataSource (_db ._bac .BubbleSize );};func (_edbg DateAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_edbg ._acg .MinorTickMark =nil ;}else {_edbg ._acg .MinorTickMark =_g .NewCT_TickMark ();_edbg ._acg .MinorTickMark .ValAttr =m ;};};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_abc SeriesAxis )X ()*_g .CT_SerAx {return _abc ._ecge };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// CategoryAxis returns the category data source.
2022-09-02 11:46:53 +00:00
func (_gde BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gde ._bac .XVal ==nil {_gde ._bac .XVal =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_gde ._bac .XVal );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// Properties returns the bar chart series shape properties.
func (_dfa BarChartSeries )Properties ()_fa .ShapeProperties {if _dfa ._ad .SpPr ==nil {_dfa ._ad .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_dfa ._ad .SpPr );};func (_dgee ScatterChartSeries )InitializeDefaults (){_dgee .Properties ().LineProperties ().SetNoFill ();_dgee .Marker ().SetSymbol (_g .ST_MarkerStyleAuto );_dgee .Labels ().SetShowLegendKey (false );_dgee .Labels ().SetShowValue (true );_dgee .Labels ().SetShowPercent (false );_dgee .Labels ().SetShowCategoryName (false );_dgee .Labels ().SetShowSeriesName (false );_dgee .Labels ().SetShowLeaderLines (false );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddBarChart adds a new bar chart to a chart.
func (_gef Chart )AddBarChart ()BarChart {_fcc :=_g .NewCT_PlotAreaChoice ();_gef ._gcf .Chart .PlotArea .Choice =append (_gef ._gcf .Chart .PlotArea .Choice ,_fcc );_fcc .BarChart =_g .NewCT_BarChart ();_fcc .BarChart .Grouping =_g .NewCT_BarGrouping ();_fcc .BarChart .Grouping .ValAttr =_g .ST_BarGroupingStandard ;_bcb :=BarChart {_ec :_fcc .BarChart };_bcb .InitializeDefaults ();return _bcb ;};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_fda *_g .CT_LineSer };func (_ggc Surface3DChart )InitializeDefaults (){_ggc ._dgb .Wireframe =_g .NewCT_Boolean ();_ggc ._dgb .Wireframe .ValAttr =_ge .Bool (false );_ggc ._dgb .BandFmts =_g .NewCT_BandFmts ();for _cgd :=0;_cgd < 15;_cgd ++{_efef :=_g .NewCT_BandFmt ();_efef .Idx .ValAttr =uint32 (_cgd );_efef .SpPr =_b .NewCT_ShapeProperties ();_cdg :=_fa .MakeShapeProperties (_efef .SpPr );_cdg .SetSolidFill (_ggc .nextColor (_cgd ));_ggc ._dgb .BandFmts .BandFmt =append (_ggc ._dgb .BandFmts .BandFmt ,_efef );};};func (_eab LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _eab ._fda .Cat ==nil {_eab ._fda .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_eab ._fda .Cat );};
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// AddBubbleChart adds a new bubble chart.
func (_fgddf Chart )AddBubbleChart ()BubbleChart {_bd :=_g .NewCT_PlotAreaChoice ();_fgddf ._gcf .Chart .PlotArea .Choice =append (_fgddf ._gcf .Chart .PlotArea .Choice ,_bd );_bd .BubbleChart =_g .NewCT_BubbleChart ();_fee :=BubbleChart {_egb :_bd .BubbleChart };_fee .InitializeDefaults ();return _fee ;};func (_gbdb SeriesAxis )InitializeDefaults (){};
2021-05-31 16:22:30 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_be Bar3DChart )X ()*_g .CT_Bar3DChart {return _be ._abb };
2022-02-25 19:20:45 +00:00
2022-09-02 11:46:53 +00:00
// CategoryAxis returns the category data source.
func (_dff PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dff ._gfg .Cat ==nil {_dff ._gfg .Cat =_g .NewCT_AxDataSource ();};return MakeAxisDataSource (_dff ._gfg .Cat );};
2021-05-31 16:22:30 +00:00
2022-02-05 13:05:36 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_gce GridLines )X ()*_g .CT_ChartLines {return _gce ._bcad };
2021-11-10 11:45:21 +00:00
2022-09-02 11:46:53 +00:00
// SetText sets the series text.
func (_bbf PieChartSeries )SetText (s string ){_bbf ._gfg .Tx =_g .NewCT_SerTx ();_bbf ._gfg .Tx .Choice .V =&s ;};func (_cbb DataLabels )ensureChoice (){if _cbb ._dca .Choice ==nil {_cbb ._dca .Choice =_g .NewCT_DLblsChoice ();};};
2021-11-10 11:45:21 +00:00
2022-09-02 11:46:53 +00:00
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_ab *_g .CT_AreaChart ;};type ScatterChart struct{chartBase ;_fdcg *_g .CT_ScatterChart ;};
2021-11-10 11:45:21 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults the bar chart to its defaults
func (_ea Area3DChart )InitializeDefaults (){};
2021-11-10 11:45:21 +00:00
2022-09-02 11:46:53 +00:00
// Index returns the index of the series
func (_cfadd SurfaceChartSeries )Index ()uint32 {return _cfadd ._geff .Idx .ValAttr };func MakeTitle (x *_g .CT_Title )Title {return Title {x }};
2020-08-23 14:15:53 +00:00
2022-02-05 13:05:36 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_bfb BarChartSeries )X ()*_g .CT_BarSer {return _bfb ._ad };
2022-09-02 11:46:53 +00:00
// InitializeDefaults the bar chart to its defaults
func (_egbd RadarChart )InitializeDefaults (){_egbd ._dfe .RadarStyle .ValAttr =_g .ST_RadarStyleMarker };
2021-11-10 11:45:21 +00:00
2022-09-02 11:46:53 +00:00
// AddSeries adds a default series to an area chart.
func (_de Area3DChart )AddSeries ()AreaChartSeries {_fg :=_de .nextColor (len (_de ._e .Ser ));_dc :=_g .NewCT_AreaSer ();_de ._e .Ser =append (_de ._e .Ser ,_dc );_dc .Idx .ValAttr =uint32 (len (_de ._e .Ser )-1);_dc .Order .ValAttr =uint32 (len (_de ._e .Ser )-1);_eb :=AreaChartSeries {_dc };_eb .InitializeDefaults ();_eb .Properties ().SetSolidFill (_fg );return _eb ;};
2021-01-04 16:11:39 +00:00
2022-09-02 11:46:53 +00:00
// Properties returns the chart's shape properties.
func (_feg Chart )Properties ()_fa .ShapeProperties {if _feg ._gcf .SpPr ==nil {_feg ._gcf .SpPr =_b .NewCT_ShapeProperties ();};return _fa .MakeShapeProperties (_feg ._gcf .SpPr );};
2022-02-05 13:05:36 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_ggd DateAxis )X ()*_g .CT_DateAx {return _ggd ._acg };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_dd BubbleChartSeries )X ()*_g .CT_BubbleSer {return _dd ._bac };
2020-08-23 14:15:53 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults the bar chart to its defaults
func (_ebcb Pie3DChart )InitializeDefaults (){_ebcb ._fca .VaryColors =_g .NewCT_Boolean ();_ebcb ._fca .VaryColors .ValAttr =_ge .Bool (true );};
2021-01-04 16:11:39 +00:00
2022-06-27 19:44:23 +00:00
// SetText sets the series text
2022-09-02 11:46:53 +00:00
func (_baag LineChartSeries )SetText (s string ){_baag ._fda .Tx =_g .NewCT_SerTx ();_baag ._fda .Tx .Choice .V =&s ;};
2021-01-04 16:11:39 +00:00
2022-09-02 11:46:53 +00:00
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
func (_cbg CategoryAxisDataSource )SetLabelReference (s string ){_cbg ._bg .Choice =_g .NewCT_AxDataSourceChoice ();_cbg ._bg .Choice .StrRef =_g .NewCT_StrRef ();_cbg ._bg .Choice .StrRef .F =s ;};func (_dac Title )InitializeDefaults (){_dac .SetText ("\u0054\u0069\u0074l\u0065");_dac .RunProperties ().SetSize (16*_fb .Point );_dac .RunProperties ().SetSolidFill (_fc .Black );_dac .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_dac .RunProperties ().SetBold (false );};func (_bgf DateAxis )SetCrosses (axis Axis ){_bgf ._acg .CrossAx .ValAttr =axis .AxisID ()};func MakeChart (x *_g .ChartSpace )Chart {return Chart {x }};
2021-04-23 20:00:00 +00:00
2022-09-02 11:46:53 +00:00
// X returns the inner wrapped XML type.
func (_dcg SurfaceChart )X ()*_g .CT_SurfaceChart {return _dcg ._edeb };type SeriesAxis struct{_ecge *_g .CT_SerAx };
2021-07-30 17:03:26 +00:00
2022-09-02 11:46:53 +00:00
// SetText sets the series text.
func (_abd BubbleChartSeries )SetText (s string ){_abd ._bac .Tx =_g .NewCT_SerTx ();_abd ._bac .Tx .Choice .V =&s ;};
2021-09-22 16:41:01 +00:00
2022-09-02 11:46:53 +00:00
// InitializeDefaults initializes a bar chart series to the default values.
func (_cff BarChartSeries )InitializeDefaults (){};func (_edgb ValueAxis )SetMinorTickMark (m _g .ST_TickMark ){if m ==_g .ST_TickMarkUnset {_edgb ._bge .MinorTickMark =nil ;}else {_edgb ._bge .MinorTickMark =_g .NewCT_TickMark ();_edgb ._bge .MinorTickMark .ValAttr =m ;};};
2022-01-15 21:17:38 +00:00
2022-09-02 11:46:53 +00:00
// AddPieOfPieChart adds a new pie chart to a chart.
func (_bcab Chart )AddPieOfPieChart ()PieOfPieChart {_bfa :=_g .NewCT_PlotAreaChoice ();_bcab ._gcf .Chart .PlotArea .Choice =append (_bcab ._gcf .Chart .PlotArea .Choice ,_bfa );_bfa .OfPieChart =_g .NewCT_OfPieChart ();_fcbe :=PieOfPieChart {_adc :_bfa .OfPieChart };_fcbe .InitializeDefaults ();return _fcbe ;};func (_bb nullAxis )AxisID ()uint32 {return 0};
2022-02-05 13:05:36 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-09-02 11:46:53 +00:00
func (_abgg Title )X ()*_g .CT_Title {return _abgg ._cbec };
// Order returns the order of the series
func (_gaag SurfaceChartSeries )Order ()uint32 {return _gaag ._geff .Order .ValAttr };type Marker struct{_eee *_g .CT_Marker };