unioffice/chart/chart.go

644 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/
2024-05-08 13:54:39 +00:00
package chart ;import (_b "fmt";_e "github.com/unidoc/unioffice";_fac "github.com/unidoc/unioffice/color";_d "github.com/unidoc/unioffice/drawing";_fd "github.com/unidoc/unioffice/measurement";_g "github.com/unidoc/unioffice/schema/soo/dml";_fa "github.com/unidoc/unioffice/schema/soo/dml/chart";
_fg "math/rand";);
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_bfcd *_fa .CT_ScatterSer };
2017-09-07 12:08:13 -04:00
2024-05-08 13:54:39 +00:00
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_daf Chart )AddBar3DChart ()Bar3DChart {_ageb (_daf ._fcg .Chart );_efc :=_fa .NewCT_PlotAreaChoice ();_daf ._fcg .Chart .PlotArea .Choice =append (_daf ._fcg .Chart .PlotArea .Choice ,_efc );_efc .Bar3DChart =_fa .NewCT_Bar3DChart ();_efc .Bar3DChart .Grouping =_fa .NewCT_BarGrouping ();
_efc .Bar3DChart .Grouping .ValAttr =_fa .ST_BarGroupingStandard ;_agc :=Bar3DChart {_dd :_efc .Bar3DChart };_agc .InitializeDefaults ();return _agc ;};
2021-06-16 07:10:52 +00:00
2024-05-08 13:54:39 +00:00
// AddAxis adds an axis to a Scatter chart.
func (_dca ScatterChart )AddAxis (axis Axis ){_fdbe :=_fa .NewCT_UnsignedInt ();_fdbe .ValAttr =axis .AxisID ();_dca ._daa .AxId =append (_dca ._daa .AxId ,_fdbe );};
2017-09-06 17:33:34 -04:00
2024-05-08 13:54:39 +00:00
// SetOrder sets the order of the series
func (_acee LineChartSeries )SetOrder (idx uint32 ){_acee ._fde .Order .ValAttr =idx };func (_ee Area3DChart )AddAxis (axis Axis ){_cb :=_fa .NewCT_UnsignedInt ();_cb .ValAttr =axis .AxisID ();_ee ._fgb .AxId =append (_ee ._fgb .AxId ,_cb );};func (_ebga SeriesAxis )InitializeDefaults (){};
func (_dcec SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dcec ._ggf .Cat ==nil {_dcec ._ggf .Cat =_fa .NewCT_AxDataSource ();};return MakeAxisDataSource (_dcec ._ggf .Cat );};
2021-03-16 20:51:18 +00:00
2024-05-08 13:54:39 +00:00
// AddSurfaceChart adds a new surface chart to a chart.
func (_aee Chart )AddSurfaceChart ()SurfaceChart {_bcg :=_fa .NewCT_PlotAreaChoice ();_aee ._fcg .Chart .PlotArea .Choice =append (_aee ._fcg .Chart .PlotArea .Choice ,_bcg );_bcg .SurfaceChart =_fa .NewCT_SurfaceChart ();_ageb (_aee ._fcg .Chart );_aee ._fcg .Chart .View3D .RotX .ValAttr =_e .Int8 (90);
_aee ._fcg .Chart .View3D .RotY .ValAttr =_e .Uint16 (0);_aee ._fcg .Chart .View3D .Perspective =_fa .NewCT_Perspective ();_aee ._fcg .Chart .View3D .Perspective .ValAttr =_e .Uint8 (0);_abe :=SurfaceChart {_fada :_bcg .SurfaceChart };_abe .InitializeDefaults ();
return _abe ;};
2024-05-08 13:54:39 +00:00
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_cdf *_fa .CT_OfPieChart ;};func (_eed Legend )SetPosition (p _fa .ST_LegendPos ){if p ==_fa .ST_LegendPosUnset {_eed ._gcf .LegendPos =nil ;}else {_eed ._gcf .LegendPos =_fa .NewCT_LegendPos ();_eed ._gcf .LegendPos .ValAttr =p ;
};};
2022-01-15 21:17:38 +00:00
2024-02-17 03:37:07 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_facd RadarChartSeries )X ()*_fa .CT_RadarSer {return _facd ._dbde };func (_fba ValueAxis )SetTickLabelPosition (p _fa .ST_TickLblPos ){if p ==_fa .ST_TickLblPosUnset {_fba ._ddf .TickLblPos =nil ;}else {_fba ._ddf .TickLblPos =_fa .NewCT_TickLblPos ();
_fba ._ddf .TickLblPos .ValAttr =p ;};};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to a Bubble chart.
func (_aad BubbleChart )AddSeries ()BubbleChartSeries {_cca :=_aad .nextColor (len (_aad ._bbc .Ser ));_ab :=_fa .NewCT_BubbleSer ();_aad ._bbc .Ser =append (_aad ._bbc .Ser ,_ab );_ab .Idx .ValAttr =uint32 (len (_aad ._bbc .Ser )-1);_ab .Order .ValAttr =uint32 (len (_aad ._bbc .Ser )-1);
_caf :=BubbleChartSeries {_ab };_caf .InitializeDefaults ();_caf .Properties ().SetSolidFill (_cca );return _caf ;};
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_ggdeb Surface3DChart )X ()*_fa .CT_Surface3DChart {return _ggdeb ._bda };
2023-04-15 17:27:31 +00:00
2024-05-08 13:54:39 +00:00
// Chart is a generic chart.
type Chart struct{_fcg *_fa .ChartSpace };
2023-04-15 17:27:31 +00:00
2024-05-04 18:48:06 +00:00
// InitializeDefaults the bar chart to its defaults
2024-05-08 13:54:39 +00:00
func (_gc AreaChart )InitializeDefaults (){};
2021-04-23 20:00:00 +00:00
2024-05-08 13:54:39 +00:00
// Properties returns the line chart series shape properties.
func (_edb LineChartSeries )Properties ()_d .ShapeProperties {if _edb ._fde .SpPr ==nil {_edb ._fde .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_edb ._fde .SpPr );};
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_dea SurfaceChart )X ()*_fa .CT_SurfaceChart {return _dea ._fada };
2024-05-08 13:54:39 +00:00
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_bd *_fa .CT_BubbleSer };func (_fafe StockChart )AddAxis (axis Axis ){_cbdg :=_fa .NewCT_UnsignedInt ();_cbdg .ValAttr =axis .AxisID ();_fafe ._aged .AxId =append (_fafe ._aged .AxId ,_cbdg );};
2022-06-27 19:44:23 +00:00
2024-05-08 13:54:39 +00:00
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_ead Chart )AddLegend ()Legend {_ead ._fcg .Chart .Legend =_fa .NewCT_Legend ();_dfg :=MakeLegend (_ead ._fcg .Chart .Legend );_dfg .InitializeDefaults ();return _dfg ;};
2020-08-23 14:15:53 +00:00
2024-05-04 18:48:06 +00:00
// SetText sets the series text.
2024-05-08 13:54:39 +00:00
func (_dgd BubbleChartSeries )SetText (s string ){_dgd ._bd .Tx =_fa .NewCT_SerTx ();_dgd ._bd .Tx .Choice .V =&s ;};
2023-07-04 11:04:03 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_eegd DateAxis )X ()*_fa .CT_DateAx {return _eegd ._fce };
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// Values returns the value data source.
func (_ffa RadarChartSeries )Values ()NumberDataSource {if _ffa ._dbde .Val ==nil {_ffa ._dbde .Val =_fa .NewCT_NumDataSource ();};return MakeNumberDataSource (_ffa ._dbde .Val );};
2023-08-06 17:57:53 +00:00
2024-05-08 13:54:39 +00:00
// Properties returns the chart's shape properties.
func (_ceb Chart )Properties ()_d .ShapeProperties {if _ceb ._fcg .SpPr ==nil {_ceb ._fcg .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_ceb ._fcg .SpPr );};func (_bgc DataLabels )SetShowCategoryName (b bool ){_bgc .ensureChoice ();
_bgc ._gfgg .Choice .ShowCatName =_fa .NewCT_Boolean ();_bgc ._gfgg .Choice .ShowCatName .ValAttr =_e .Bool (b );};
2022-04-09 14:27:46 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults initializes a bar chart series to the default values.
func (_fc BarChartSeries )InitializeDefaults (){};type DateAxis struct{_fce *_fa .CT_DateAx };func (_fgbe CategoryAxis )AxisID ()uint32 {return _fgbe ._bfgc .AxId .ValAttr };
2021-09-22 16:41:01 +00:00
2024-05-08 13:54:39 +00:00
// SetValues sets values directly on a source.
func (_edd NumberDataSource )SetValues (v []float64 ){_edd .ensureChoice ();_edd ._fdg .Choice .NumRef =nil ;_edd ._fdg .Choice .NumLit =_fa .NewCT_NumData ();_edd ._fdg .Choice .NumLit .PtCount =_fa .NewCT_UnsignedInt ();_edd ._fdg .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));
for _bcb ,_ebee :=range v {_edd ._fdg .Choice .NumLit .Pt =append (_edd ._fdg .Choice .NumLit .Pt ,&_fa .CT_NumVal {IdxAttr :uint32 (_bcb ),V :_b .Sprintf ("\u0025\u0067",_ebee )});};};func (_bab Legend )InitializeDefaults (){_bab .SetPosition (_fa .ST_LegendPosR );
_bab .SetOverlay (false );_bab .Properties ().SetNoFill ();_bab .Properties ().LineProperties ().SetNoFill ();};func (_dfa DataLabels )SetShowSeriesName (b bool ){_dfa .ensureChoice ();_dfa ._gfgg .Choice .ShowSerName =_fa .NewCT_Boolean ();_dfa ._gfgg .Choice .ShowSerName .ValAttr =_e .Bool (b );
};func (_ccad LineChartSeries )InitializeDefaults (){_ccad .Properties ().LineProperties ().SetWidth (1*_fd .Point );_ccad .Properties ().LineProperties ().SetSolidFill (_fac .Black );_ccad .Properties ().LineProperties ().SetJoin (_d .LineJoinRound );
_ccad .Marker ().SetSymbol (_fa .ST_MarkerStyleNone );_ccad .Labels ().SetShowLegendKey (false );_ccad .Labels ().SetShowValue (false );_ccad .Labels ().SetShowPercent (false );_ccad .Labels ().SetShowCategoryName (false );_ccad .Labels ().SetShowSeriesName (false );
_ccad .Labels ().SetShowLeaderLines (false );};func (_egd GridLines )Properties ()_d .ShapeProperties {if _egd ._cge .SpPr ==nil {_egd ._cge .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_egd ._cge .SpPr );};
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_abeb Pie3DChart )X ()*_fa .CT_Pie3DChart {return _abeb ._dgdf };
2021-01-04 16:11:39 +00:00
2024-05-08 13:54:39 +00:00
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_bc *_fa .CT_BarSer };
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_bbc *_fa .CT_BubbleChart ;};func (_edc CategoryAxis )SetPosition (p _fa .ST_AxPos ){_edc ._bfgc .AxPos =_fa .NewCT_AxPos ();_edc ._bfgc .AxPos .ValAttr =p ;};func (_acbg DateAxis )SetPosition (p _fa .ST_AxPos ){_acbg ._fce .AxPos =_fa .NewCT_AxPos ();
_acbg ._fce .AxPos .ValAttr =p ;};
2023-09-16 17:56:36 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_dbe BubbleChartSeries )InitializeDefaults (){};
2023-12-12 23:20:29 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_afe Marker )X ()*_fa .CT_Marker {return _afe ._gfb };
2023-12-12 23:20:29 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to an Pie chart.
func (_eca PieChart )AddSeries ()PieChartSeries {_afbb :=_fa .NewCT_PieSer ();_eca ._fcb .Ser =append (_eca ._fcb .Ser ,_afbb );_afbb .Idx .ValAttr =uint32 (len (_eca ._fcb .Ser )-1);_afbb .Order .ValAttr =uint32 (len (_eca ._fcb .Ser )-1);_fbb :=PieChartSeries {_afbb };
_fbb .InitializeDefaults ();return _fbb ;};
2023-12-12 23:20:29 +00:00
2024-05-08 13:54:39 +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{_fgd *_fa .CT_AxDataSource };
2021-04-23 20:00:00 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults the bar chart to its defaults
func (_ba BarChart )InitializeDefaults (){_ba .SetDirection (_fa .ST_BarDirCol )};func (_eea Title )RunProperties ()_d .RunProperties {if _eea ._bade .Tx ==nil {_eea .SetText ("");};if _eea ._bade .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_eea ._bade .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_g .NewCT_TextCharacterProperties ();
};return _d .MakeRunProperties (_eea ._bade .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};
2024-05-08 13:54:39 +00:00
// Values returns the value data source.
func (_ecc PieChartSeries )Values ()NumberDataSource {if _ecc ._dgb .Val ==nil {_ecc ._dgb .Val =_fa .NewCT_NumDataSource ();};return MakeNumberDataSource (_ecc ._dgb .Val );};func (_eda DataLabels )SetShowPercent (b bool ){_eda .ensureChoice ();_eda ._gfgg .Choice .ShowPercent =_fa .NewCT_Boolean ();
_eda ._gfgg .Choice .ShowPercent .ValAttr =_e .Bool (b );};
2021-08-23 20:44:48 +00:00
2024-05-08 13:54:39 +00:00
// Properties returns the line chart series shape properties.
func (_fbc ScatterChartSeries )Properties ()_d .ShapeProperties {if _fbc ._bfcd .SpPr ==nil {_fbc ._bfcd .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_fbc ._bfcd .SpPr );};
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to a bar chart.
func (_cbf BarChart )AddSeries ()BarChartSeries {_gga :=_cbf .nextColor (len (_cbf ._eg .Ser ));_cc :=_fa .NewCT_BarSer ();_cbf ._eg .Ser =append (_cbf ._eg .Ser ,_cc );_cc .Idx .ValAttr =uint32 (len (_cbf ._eg .Ser )-1);_cc .Order .ValAttr =uint32 (len (_cbf ._eg .Ser )-1);
_cg :=BarChartSeries {_cc };_cg .InitializeDefaults ();_cg .Properties ().SetSolidFill (_gga );return _cg ;};
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// AddValueAxis adds a value axis to the chart.
func (_bcgb Chart )AddValueAxis ()ValueAxis {_facg :=_fa .NewCT_ValAx ();if _bcgb ._fcg .Chart .PlotArea .CChoice ==nil {_bcgb ._fcg .Chart .PlotArea .CChoice =_fa .NewCT_PlotAreaChoice1 ();};_facg .AxId =_fa .NewCT_UnsignedInt ();_facg .AxId .ValAttr =0x7FFFFFFF&_fg .Uint32 ();
_bcgb ._fcg .Chart .PlotArea .CChoice .ValAx =append (_bcgb ._fcg .Chart .PlotArea .CChoice .ValAx ,_facg );_facg .Delete =_fa .NewCT_Boolean ();_facg .Delete .ValAttr =_e .Bool (false );_facg .Scaling =_fa .NewCT_Scaling ();_facg .Scaling .Orientation =_fa .NewCT_Orientation ();
_facg .Scaling .Orientation .ValAttr =_fa .ST_OrientationMinMax ;_facg .Choice =&_fa .EG_AxSharedChoice {};_facg .Choice .Crosses =_fa .NewCT_Crosses ();_facg .Choice .Crosses .ValAttr =_fa .ST_CrossesAutoZero ;_facg .CrossBetween =_fa .NewCT_CrossBetween ();
_facg .CrossBetween .ValAttr =_fa .ST_CrossBetweenBetween ;_dbd :=MakeValueAxis (_facg );_dbd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fac .LightGray );_dbd .SetMajorTickMark (_fa .ST_TickMarkOut );_dbd .SetMinorTickMark (_fa .ST_TickMarkIn );
_dbd .SetTickLabelPosition (_fa .ST_TickLblPosNextTo );_dbd .Properties ().LineProperties ().SetSolidFill (_fac .Black );_dbd .SetPosition (_fa .ST_AxPosL );return _dbd ;};
2023-07-04 11:04:03 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_dfd DoughnutChart )X ()*_fa .CT_DoughnutChart {return _dfd ._abd };func (_fad BubbleChart )AddAxis (axis Axis ){_eaa :=_fa .NewCT_UnsignedInt ();_eaa .ValAttr =axis .AxisID ();_fad ._bbc .AxId =append (_fad ._bbc .AxId ,_eaa );};
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +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 (_cbbf NumberDataSource )CreateEmptyNumberCache (){_cbbf .ensureChoice ();if _cbbf ._fdg .Choice .NumRef ==nil {_cbbf ._fdg .Choice .NumRef =_fa .NewCT_NumRef ();};_cbbf ._fdg .Choice .NumLit =nil ;_cbbf ._fdg .Choice .NumRef .NumCache =_fa .NewCT_NumData ();
_cbbf ._fdg .Choice .NumRef .NumCache .PtCount =_fa .NewCT_UnsignedInt ();_cbbf ._fdg .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
2022-04-09 14:27:46 +00:00
2023-12-28 15:53:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_bfd RadarChart )X ()*_fa .CT_RadarChart {return _bfd ._fcbd };
2023-03-01 18:42:44 +00:00
2024-05-08 13:54:39 +00:00
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_eg *_fa .CT_BarChart ;};
2022-02-05 13:05:36 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults the Stock chart to its defaults
func (_gbgb StockChart )InitializeDefaults (){_gbgb ._aged .HiLowLines =_fa .NewCT_ChartLines ();_gbgb ._aged .UpDownBars =_fa .NewCT_UpDownBars ();_gbgb ._aged .UpDownBars .GapWidth =_fa .NewCT_GapAmount ();_gbgb ._aged .UpDownBars .GapWidth .ValAttr =&_fa .ST_GapAmount {};
_gbgb ._aged .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_e .Uint16 (150);_gbgb ._aged .UpDownBars .UpBars =_fa .NewCT_UpDownBar ();_gbgb ._aged .UpDownBars .DownBars =_fa .NewCT_UpDownBar ();};func MakeTitle (x *_fa .CT_Title )Title {return Title {x }};
2022-02-05 13:05:36 +00:00
2021-08-23 20:44:48 +00:00
2024-05-08 13:54:39 +00:00
// AddCategoryAxis adds a category axis.
func (_ada Chart )AddCategoryAxis ()CategoryAxis {_cba :=_fa .NewCT_CatAx ();if _ada ._fcg .Chart .PlotArea .CChoice ==nil {_ada ._fcg .Chart .PlotArea .CChoice =_fa .NewCT_PlotAreaChoice1 ();};_cba .AxId =_fa .NewCT_UnsignedInt ();_cba .AxId .ValAttr =0x7FFFFFFF&_fg .Uint32 ();
_ada ._fcg .Chart .PlotArea .CChoice .CatAx =append (_ada ._fcg .Chart .PlotArea .CChoice .CatAx ,_cba );_cba .Auto =_fa .NewCT_Boolean ();_cba .Auto .ValAttr =_e .Bool (true );_cba .Delete =_fa .NewCT_Boolean ();_cba .Delete .ValAttr =_e .Bool (false );
_dff :=MakeCategoryAxis (_cba );_dff .InitializeDefaults ();return _dff ;};
2021-08-23 20:44:48 +00:00
2024-05-08 13:54:39 +00:00
// Marker returns the marker properties.
func (_aede ScatterChartSeries )Marker ()Marker {if _aede ._bfcd .Marker ==nil {_aede ._bfcd .Marker =_fa .NewCT_Marker ();};return MakeMarker (_aede ._bfcd .Marker );};
2023-07-04 11:04:03 +00:00
2024-05-08 13:54:39 +00:00
// AddAxis adds an axis to a line chart.
func (_def Line3DChart )AddAxis (axis Axis ){_agb :=_fa .NewCT_UnsignedInt ();_agb .ValAttr =axis .AxisID ();_def ._dgc .AxId =append (_def ._dgc .AxId ,_agb );};
2023-09-16 17:56:36 +00:00
2024-05-08 13:54:39 +00:00
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_bda *_fa .CT_Surface3DChart ;};func MakeDataLabels (x *_fa .CT_DLbls )DataLabels {return DataLabels {x }};type ScatterChart struct{chartBase ;_daa *_fa .CT_ScatterChart ;};
2023-09-16 17:56:36 +00:00
2024-05-08 13:54:39 +00:00
// AddStockChart adds a new stock chart.
func (_gb Chart )AddStockChart ()StockChart {_ffg :=_fa .NewCT_PlotAreaChoice ();_gb ._fcg .Chart .PlotArea .Choice =append (_gb ._fcg .Chart .PlotArea .Choice ,_ffg );_ffg .StockChart =_fa .NewCT_StockChart ();_bac :=StockChart {_aged :_ffg .StockChart };
_bac .InitializeDefaults ();return _bac ;};func (_de CategoryAxis )MajorGridLines ()GridLines {if _de ._bfgc .MajorGridlines ==nil {_de ._bfgc .MajorGridlines =_fa .NewCT_ChartLines ();};return GridLines {_de ._bfgc .MajorGridlines };};
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_eeg BarChartSeries )X ()*_fa .CT_BarSer {return _eeg ._bc };
2021-06-16 07:10:52 +00:00
2024-05-08 13:54:39 +00:00
// Properties returns the line chart series shape properties.
func (_eedg SurfaceChartSeries )Properties ()_d .ShapeProperties {if _eedg ._ggf .SpPr ==nil {_eedg ._ggf .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_eedg ._ggf .SpPr );};func MakeSeriesAxis (x *_fa .CT_SerAx )SeriesAxis {return SeriesAxis {x }};
2024-05-04 18:48:06 +00:00
2022-06-27 19:44:23 +00:00
2024-05-08 13:54:39 +00:00
// AddPieOfPieChart adds a new pie chart to a chart.
func (_abed Chart )AddPieOfPieChart ()PieOfPieChart {_eef :=_fa .NewCT_PlotAreaChoice ();_abed ._fcg .Chart .PlotArea .Choice =append (_abed ._fcg .Chart .PlotArea .Choice ,_eef );_eef .OfPieChart =_fa .NewCT_OfPieChart ();_bga :=PieOfPieChart {_cdf :_eef .OfPieChart };
_bga .InitializeDefaults ();return _bga ;};func (_gcg DateAxis )AxisID ()uint32 {return _gcg ._fce .AxId .ValAttr };
2022-09-02 11:46:53 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_gbda StockChart )X ()*_fa .CT_StockChart {return _gbda ._aged };
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_bfe ValueAxis )X ()*_fa .CT_ValAx {return _bfe ._ddf };
2023-08-06 17:57:53 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_gef PieChartSeries )X ()*_fa .CT_PieSer {return _gef ._dgb };func (_dgg DateAxis )Properties ()_d .ShapeProperties {if _dgg ._fce .SpPr ==nil {_dgg ._fce .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_dgg ._fce .SpPr );};
2023-08-06 17:57:53 +00:00
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to an area chart.
func (_fge AreaChart )AddSeries ()AreaChartSeries {_eb :=_fge .nextColor (len (_fge ._bg .Ser ));_gd :=_fa .NewCT_AreaSer ();_fge ._bg .Ser =append (_fge ._bg .Ser ,_gd );_gd .Idx .ValAttr =uint32 (len (_fge ._bg .Ser )-1);_gd .Order .ValAttr =uint32 (len (_fge ._bg .Ser )-1);
_ag :=AreaChartSeries {_gd };_ag .InitializeDefaults ();_ag .Properties ().SetSolidFill (_eb );return _ag ;};
2021-09-22 16:41:01 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_db Area3DChart )X ()*_fa .CT_Area3DChart {return _db ._fgb };func (_eaafc Title )ParagraphProperties ()_d .ParagraphProperties {if _eaafc ._bade .Tx ==nil {_eaafc .SetText ("");};if _eaafc ._bade .Tx .Choice .Rich .P [0].PPr ==nil {_eaafc ._bade .Tx .Choice .Rich .P [0].PPr =_g .NewCT_TextParagraphProperties ();
};return _d .MakeParagraphProperties (_eaafc ._bade .Tx .Choice .Rich .P [0].PPr );};
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_cgga Legend )X ()*_fa .CT_Legend {return _cgga ._gcf };
// AddSeries adds a default series to an Pie3D chart.
func (_adg Pie3DChart )AddSeries ()PieChartSeries {_dabe :=_fa .NewCT_PieSer ();_adg ._dgdf .Ser =append (_adg ._dgdf .Ser ,_dabe );_dabe .Idx .ValAttr =uint32 (len (_adg ._dgdf .Ser )-1);_dabe .Order .ValAttr =uint32 (len (_adg ._dgdf .Ser )-1);_eebb :=PieChartSeries {_dabe };
_eebb .InitializeDefaults ();return _eebb ;};
// SetText sets the series text
func (_cgb LineChartSeries )SetText (s string ){_cgb ._fde .Tx =_fa .NewCT_SerTx ();_cgb ._fde .Tx .Choice .V =&s ;};
// Index returns the index of the series
func (_cgeg ScatterChartSeries )Index ()uint32 {return _cgeg ._bfcd .Idx .ValAttr };
2023-04-15 17:27:31 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_ad BarChart )X ()*_fa .CT_BarChart {return _ad ._eg };type Legend struct{_gcf *_fa .CT_Legend };
2023-08-06 17:57:53 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to a Surface chart.
func (_cbc Surface3DChart )AddSeries ()SurfaceChartSeries {_gdcb :=_cbc .nextColor (len (_cbc ._bda .Ser ));_fcag :=_fa .NewCT_SurfaceSer ();_cbc ._bda .Ser =append (_cbc ._bda .Ser ,_fcag );_fcag .Idx .ValAttr =uint32 (len (_cbc ._bda .Ser )-1);_fcag .Order .ValAttr =uint32 (len (_cbc ._bda .Ser )-1);
_fbgf :=SurfaceChartSeries {_fcag };_fbgf .InitializeDefaults ();_fbgf .Properties ().LineProperties ().SetSolidFill (_gdcb );return _fbgf ;};
2020-11-09 01:00:18 +00:00
2024-05-08 13:54:39 +00:00
// SetDirection changes the direction of the bar chart (bar or column).
func (_fe BarChart )SetDirection (d _fa .ST_BarDir ){_fe ._eg .BarDir .ValAttr =d };
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// CategoryAxis returns the category data source.
func (_cbd PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cbd ._dgb .Cat ==nil {_cbd ._dgb .Cat =_fa .NewCT_AxDataSource ();};return MakeAxisDataSource (_cbd ._dgb .Cat );};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// Labels returns the data label properties.
func (_addc ScatterChartSeries )Labels ()DataLabels {if _addc ._bfcd .DLbls ==nil {_addc ._bfcd .DLbls =_fa .NewCT_DLbls ();};return MakeDataLabels (_addc ._bfcd .DLbls );};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_ff *_fa .CT_AreaSer };
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_abd *_fa .CT_DoughnutChart ;};func (_fdea SurfaceChartSeries )InitializeDefaults (){_fdea .Properties ().LineProperties ().SetWidth (1*_fd .Point );_fdea .Properties ().LineProperties ().SetSolidFill (_fac .Black );
_fdea .Properties ().LineProperties ().SetJoin (_d .LineJoinRound );};func (_fdag SurfaceChartSeries )Values ()NumberDataSource {if _fdag ._ggf .Val ==nil {_fdag ._ggf .Val =_fa .NewCT_NumDataSource ();};_eff :=MakeNumberDataSource (_fdag ._ggf .Val );
_eff .CreateEmptyNumberCache ();return _eff ;};
2023-05-26 09:49:04 +00:00
2024-05-08 13:54:39 +00:00
// CategoryAxis returns the category data source.
func (_gcb BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gcb ._bd .XVal ==nil {_gcb ._bd .XVal =_fa .NewCT_AxDataSource ();};return MakeAxisDataSource (_gcb ._bd .XVal );};
// SetIndex sets the index of the series
func (_dbgg LineChartSeries )SetIndex (idx uint32 ){_dbgg ._fde .Idx .ValAttr =idx };
2021-03-16 20:51:18 +00:00
2024-05-04 18:48:06 +00:00
// Index returns the index of the series
2024-05-08 13:54:39 +00:00
func (_bfc LineChartSeries )Index ()uint32 {return _bfc ._fde .Idx .ValAttr };func (_bef Marker )SetSize (sz uint8 ){_bef ._gfb .Size =_fa .NewCT_MarkerSize ();_bef ._gfb .Size .ValAttr =&sz ;};func (_be Legend )Properties ()_d .ShapeProperties {if _be ._gcf .SpPr ==nil {_be ._gcf .SpPr =_g .NewCT_ShapeProperties ();
};return _d .MakeShapeProperties (_be ._gcf .SpPr );};
2023-08-06 17:57:53 +00:00
2024-05-08 13:54:39 +00:00
// SetText sets the series text
func (_gbg ScatterChartSeries )SetText (s string ){_gbg ._bfcd .Tx =_fa .NewCT_SerTx ();_gbg ._bfcd .Tx .Choice .V =&s ;};func (_gaceg ScatterChart )InitializeDefaults (){_gaceg ._daa .ScatterStyle .ValAttr =_fa .ST_ScatterStyleMarker ;};
2020-11-09 01:00:18 +00:00
2024-05-08 13:54:39 +00:00
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_fcbd *_fa .CT_RadarChart ;};func (_cgd LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cgd ._fde .Cat ==nil {_cgd ._fde .Cat =_fa .NewCT_AxDataSource ();};return MakeAxisDataSource (_cgd ._fde .Cat );};
2020-11-09 01:00:18 +00:00
2024-05-08 13:54:39 +00:00
// SetDirection changes the direction of the bar chart (bar or column).
func (_fb Bar3DChart )SetDirection (d _fa .ST_BarDir ){_fb ._dd .BarDir .ValAttr =d };
2022-09-02 11:46:53 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults the bar chart to its defaults
func (_a Area3DChart )InitializeDefaults (){};
2022-12-06 11:56:49 +00:00
2024-05-08 13:54:39 +00:00
// AddAxis adds an axis to a Surface chart.
func (_aff SurfaceChart )AddAxis (axis Axis ){_gaab :=_fa .NewCT_UnsignedInt ();_gaab .ValAttr =axis .AxisID ();_aff ._fada .AxId =append (_aff ._fada .AxId ,_gaab );};func (_eaaf DataLabels )ensureChoice (){if _eaaf ._gfgg .Choice ==nil {_eaaf ._gfgg .Choice =_fa .NewCT_DLblsChoice ();
};};func (_ddea SeriesAxis )SetCrosses (axis Axis ){_ddea ._cecc .CrossAx .ValAttr =axis .AxisID ()};type chartBase struct{};func (_fae DateAxis )SetMajorTickMark (m _fa .ST_TickMark ){if m ==_fa .ST_TickMarkUnset {_fae ._fce .MajorTickMark =nil ;}else {_fae ._fce .MajorTickMark =_fa .NewCT_TickMark ();
_fae ._fce .MajorTickMark .ValAttr =m ;};};
2021-09-22 16:41:01 +00:00
2024-05-08 13:54:39 +00:00
// CategoryAxis returns the category data source.
func (_ce BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ce ._bc .Cat ==nil {_ce ._bc .Cat =_fa .NewCT_AxDataSource ();};return MakeAxisDataSource (_ce ._bc .Cat );};
2023-09-16 17:56:36 +00:00
2024-05-08 13:54:39 +00:00
// Order returns the order of the series
func (_bgd ScatterChartSeries )Order ()uint32 {return _bgd ._bfcd .Order .ValAttr };
2020-10-12 13:59:12 +00:00
2024-05-08 13:54:39 +00:00
// SetDisplayBlanksAs controls how missing values are displayed.
func (_dde Chart )SetDisplayBlanksAs (v _fa .ST_DispBlanksAs ){_dde ._fcg .Chart .DispBlanksAs =_fa .NewCT_DispBlanksAs ();_dde ._fcg .Chart .DispBlanksAs .ValAttr =v ;};
2020-08-23 14:15:53 +00:00
// Values returns the value data source.
2024-05-08 13:54:39 +00:00
func (_fgf BubbleChartSeries )Values ()NumberDataSource {if _fgf ._bd .YVal ==nil {_fgf ._bd .YVal =_fa .NewCT_NumDataSource ();};return MakeNumberDataSource (_fgf ._bd .YVal );};
2023-05-26 09:49:04 +00:00
2024-05-08 13:54:39 +00:00
// SetValues is used to set the source data to a set of values.
func (_ef CategoryAxisDataSource )SetValues (v []string ){_ef ._fgd .Choice =_fa .NewCT_AxDataSourceChoice ();_ef ._fgd .Choice .StrLit =_fa .NewCT_StrData ();_ef ._fgd .Choice .StrLit .PtCount =_fa .NewCT_UnsignedInt ();_ef ._fgd .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));
for _bdc ,_fdc :=range v {_ef ._fgd .Choice .StrLit .Pt =append (_ef ._fgd .Choice .StrLit .Pt ,&_fa .CT_StrVal {IdxAttr :uint32 (_bdc ),V :_fdc });};};
2024-02-17 03:37:07 +00:00
2024-05-08 13:54:39 +00:00
// AddLine3DChart adds a new 3D line chart to a chart.
func (_fdcd Chart )AddLine3DChart ()Line3DChart {_ageb (_fdcd ._fcg .Chart );_dad :=_fa .NewCT_PlotAreaChoice ();_fdcd ._fcg .Chart .PlotArea .Choice =append (_fdcd ._fcg .Chart .PlotArea .Choice ,_dad );_dad .Line3DChart =_fa .NewCT_Line3DChart ();_dad .Line3DChart .Grouping =_fa .NewCT_Grouping ();
_dad .Line3DChart .Grouping .ValAttr =_fa .ST_GroupingStandard ;return Line3DChart {_dgc :_dad .Line3DChart };};func (_bdcg ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bdcg ._bfcd .XVal ==nil {_bdcg ._bfcd .XVal =_fa .NewCT_AxDataSource ();
};return MakeAxisDataSource (_bdcg ._bfcd .XVal );};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// AddPieChart adds a new pie chart to a chart.
func (_aeb Chart )AddPieChart ()PieChart {_dafe :=_fa .NewCT_PlotAreaChoice ();_aeb ._fcg .Chart .PlotArea .Choice =append (_aeb ._fcg .Chart .PlotArea .Choice ,_dafe );_dafe .PieChart =_fa .NewCT_PieChart ();_aec :=PieChart {_fcb :_dafe .PieChart };_aec .InitializeDefaults ();
return _aec ;};
2022-04-09 14:27:46 +00:00
2024-05-08 13:54:39 +00:00
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
func (_bff CategoryAxisDataSource )SetLabelReference (s string ){_bff ._fgd .Choice =_fa .NewCT_AxDataSourceChoice ();_bff ._fgd .Choice .StrRef =_fa .NewCT_StrRef ();_bff ._fgd .Choice .StrRef .F =s ;};
2022-04-09 14:27:46 +00:00
2024-05-08 13:54:39 +00:00
// SetText sets the series text.
func (_daba RadarChartSeries )SetText (s string ){_daba ._dbde .Tx =_fa .NewCT_SerTx ();_daba ._dbde .Tx .Choice .V =&s ;};func (_abbc Surface3DChart )InitializeDefaults (){_abbc ._bda .Wireframe =_fa .NewCT_Boolean ();_abbc ._bda .Wireframe .ValAttr =_e .Bool (false );
_abbc ._bda .BandFmts =_fa .NewCT_BandFmts ();for _eeba :=0;_eeba < 15;_eeba ++{_bbab :=_fa .NewCT_BandFmt ();_bbab .Idx .ValAttr =uint32 (_eeba );_bbab .SpPr =_g .NewCT_ShapeProperties ();_fbbb :=_d .MakeShapeProperties (_bbab .SpPr );_fbbb .SetSolidFill (_abbc .nextColor (_eeba ));
_abbc ._bda .BandFmts .BandFmt =append (_abbc ._bda .BandFmts .BandFmt ,_bbab );};};
2023-12-28 15:53:06 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_bcc SeriesAxis )X ()*_fa .CT_SerAx {return _bcc ._cecc };
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_fa .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_agef Chart )AddSurface3DChart ()Surface3DChart {_bgba :=_fa .NewCT_PlotAreaChoice ();_agef ._fcg .Chart .PlotArea .Choice =append (_agef ._fcg .Chart .PlotArea .Choice ,_bgba );_bgba .Surface3DChart =_fa .NewCT_Surface3DChart ();_ageb (_agef ._fcg .Chart );
_cgg :=Surface3DChart {_bda :_bgba .Surface3DChart };_cgg .InitializeDefaults ();return _cgg ;};
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_ae BubbleChartSeries )X ()*_fa .CT_BubbleSer {return _ae ._bd };
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_aged *_fa .CT_StockChart ;};
2023-08-06 17:57:53 +00:00
2024-05-04 18:48:06 +00:00
// InitializeDefaults the bar chart to its defaults
2024-05-08 13:54:39 +00:00
func (_dbgb PieOfPieChart )InitializeDefaults (){_dbgb ._cdf .VaryColors =_fa .NewCT_Boolean ();_dbgb ._cdf .VaryColors .ValAttr =_e .Bool (true );_dbgb .SetType (_fa .ST_OfPieTypePie );_dbgb ._cdf .SecondPieSize =_fa .NewCT_SecondPieSize ();_dbgb ._cdf .SecondPieSize .ValAttr =&_fa .ST_SecondPieSize {};
_dbgb ._cdf .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_e .Uint16 (75);_dec :=_fa .NewCT_ChartLines ();_dec .SpPr =_g .NewCT_ShapeProperties ();_gcba :=_d .MakeShapeProperties (_dec .SpPr );_gcba .LineProperties ().SetSolidFill (_fac .Auto );_dbgb ._cdf .SerLines =append (_dbgb ._cdf .SerLines ,_dec );
2024-05-04 18:48:06 +00:00
};
2022-02-25 19:20:45 +00:00
2024-05-08 13:54:39 +00:00
// SetIndex sets the index of the series
func (_gacd SurfaceChartSeries )SetIndex (idx uint32 ){_gacd ._ggf .Idx .ValAttr =idx };func MakeNumberDataSource (x *_fa .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func (_acec DateAxis )MajorGridLines ()GridLines {if _acec ._fce .MajorGridlines ==nil {_acec ._fce .MajorGridlines =_fa .NewCT_ChartLines ();
};return GridLines {_acec ._fce .MajorGridlines };};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_cf Chart )AddDoughnutChart ()DoughnutChart {_dgdd :=_fa .NewCT_PlotAreaChoice ();_cf ._fcg .Chart .PlotArea .Choice =append (_cf ._fcg .Chart .PlotArea .Choice ,_dgdd );_dgdd .DoughnutChart =_fa .NewCT_DoughnutChart ();_dcb :=DoughnutChart {_abd :_dgdd .DoughnutChart };
_dcb .InitializeDefaults ();return _dcb ;};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults the Bubble chart to its defaults
func (_dge BubbleChart )InitializeDefaults (){};
2021-03-16 20:51:18 +00:00
2024-05-08 13:54:39 +00:00
// Properties returns the bar chart series shape properties.
func (_cbe AreaChartSeries )Properties ()_d .ShapeProperties {if _cbe ._ff .SpPr ==nil {_cbe ._ff .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_cbe ._ff .SpPr );};
2020-08-23 14:15:53 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_fafd LineChart )X ()*_fa .CT_LineChart {return _fafd ._dbb };func (_egdc Legend )SetOverlay (b bool ){_egdc ._gcf .Overlay =_fa .NewCT_Boolean ();_egdc ._gcf .Overlay .ValAttr =_e .Bool (b );};
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// Marker returns the marker properties.
func (_edca LineChartSeries )Marker ()Marker {if _edca ._fde .Marker ==nil {_edca ._fde .Marker =_fa .NewCT_Marker ();};return MakeMarker (_edca ._fde .Marker );};
2023-12-28 15:53:06 +00:00
2024-05-04 18:48:06 +00:00
// InitializeDefaults the bar chart to its defaults
2024-05-08 13:54:39 +00:00
func (_aa Bar3DChart )InitializeDefaults (){_aa .SetDirection (_fa .ST_BarDirCol )};type Title struct{_bade *_fa .CT_Title };func (_daac ValueAxis )SetCrosses (axis Axis ){_daac ._ddf .CrossAx .ValAttr =axis .AxisID ()};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// Order returns the order of the series
func (_dfc SurfaceChartSeries )Order ()uint32 {return _dfc ._ggf .Order .ValAttr };
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_dga GridLines )X ()*_fa .CT_ChartLines {return _dga ._cge };func (_ggd CategoryAxis )Properties ()_d .ShapeProperties {if _ggd ._bfgc .SpPr ==nil {_ggd ._bfgc .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_ggd ._bfgc .SpPr );
2024-05-04 18:48:06 +00:00
};
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// Values returns the value data source.
func (_ca AreaChartSeries )Values ()NumberDataSource {if _ca ._ff .Val ==nil {_ca ._ff .Val =_fa .NewCT_NumDataSource ();};return MakeNumberDataSource (_ca ._ff .Val );};func (_abdc ValueAxis )SetMajorTickMark (m _fa .ST_TickMark ){if m ==_fa .ST_TickMarkUnset {_abdc ._ddf .MajorTickMark =nil ;
}else {_abdc ._ddf .MajorTickMark =_fa .NewCT_TickMark ();_abdc ._ddf .MajorTickMark .ValAttr =m ;};};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// SetOrder sets the order of the series
func (_fcefe ScatterChartSeries )SetOrder (idx uint32 ){_fcefe ._bfcd .Order .ValAttr =idx };
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_bg *_fa .CT_AreaChart ;};func MakeValueAxis (x *_fa .CT_ValAx )ValueAxis {return ValueAxis {x }};
2022-02-25 19:20:45 +00:00
2024-05-08 13:54:39 +00:00
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_ebb PieChartSeries )SetExplosion (v uint32 ){_ebb ._dgb .Explosion =_fa .NewCT_UnsignedInt ();_ebb ._dgb .Explosion .ValAttr =v ;};var NullAxis Axis =nullAxis (0);
2020-08-31 22:58:25 +00:00
2024-05-08 13:54:39 +00:00
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_age CategoryAxisDataSource )SetNumberReference (s string ){_age ._fgd .Choice =_fa .NewCT_AxDataSourceChoice ();_age ._fgd .Choice .NumRef =_fa .NewCT_NumRef ();_age ._fgd .Choice .NumRef .F =s ;};
2020-08-31 22:58:25 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to a line chart.
func (_ecf LineChart )AddSeries ()LineChartSeries {_adag :=_ecf .nextColor (len (_ecf ._dbb .Ser ));_bbg :=_fa .NewCT_LineSer ();_ecf ._dbb .Ser =append (_ecf ._dbb .Ser ,_bbg );_bbg .Idx .ValAttr =uint32 (len (_ecf ._dbb .Ser )-1);_bbg .Order .ValAttr =uint32 (len (_ecf ._dbb .Ser )-1);
_ffga :=LineChartSeries {_bbg };_ffga .InitializeDefaults ();_ffga .Properties ().LineProperties ().SetSolidFill (_adag );return _ffga ;};func (_ggc chartBase )nextColor (_abf int )_fac .Color {return _aebe [_abf %len (_aebe )]};func (_eeab ValueAxis )MajorGridLines ()GridLines {if _eeab ._ddf .MajorGridlines ==nil {_eeab ._ddf .MajorGridlines =_fa .NewCT_ChartLines ();
};return GridLines {_eeab ._ddf .MajorGridlines };};
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to a Scatter chart.
func (_egdg ScatterChart )AddSeries ()ScatterChartSeries {_gaeb :=_egdg .nextColor (len (_egdg ._daa .Ser ));_gaa :=_fa .NewCT_ScatterSer ();_egdg ._daa .Ser =append (_egdg ._daa .Ser ,_gaa );_gaa .Idx .ValAttr =uint32 (len (_egdg ._daa .Ser )-1);_gaa .Order .ValAttr =uint32 (len (_egdg ._daa .Ser )-1);
_bacf :=ScatterChartSeries {_gaa };_bacf .InitializeDefaults ();_bacf .Marker ().Properties ().LineProperties ().SetSolidFill (_gaeb );_bacf .Marker ().Properties ().SetSolidFill (_gaeb );return _bacf ;};func (_aga Chart )AddSeriesAxis ()SeriesAxis {_baa :=_fa .NewCT_SerAx ();
if _aga ._fcg .Chart .PlotArea .CChoice ==nil {_aga ._fcg .Chart .PlotArea .CChoice =_fa .NewCT_PlotAreaChoice1 ();};_baa .AxId =_fa .NewCT_UnsignedInt ();_baa .AxId .ValAttr =0x7FFFFFFF&_fg .Uint32 ();_aga ._fcg .Chart .PlotArea .CChoice .SerAx =append (_aga ._fcg .Chart .PlotArea .CChoice .SerAx ,_baa );
_baa .Delete =_fa .NewCT_Boolean ();_baa .Delete .ValAttr =_e .Bool (false );_ge :=MakeSeriesAxis (_baa );_ge .InitializeDefaults ();return _ge ;};
2020-12-17 22:07:08 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to an Radar chart.
func (_dgae RadarChart )AddSeries ()RadarChartSeries {_cec :=_dgae .nextColor (len (_dgae ._fcbd .Ser ));_efd :=_fa .NewCT_RadarSer ();_dgae ._fcbd .Ser =append (_dgae ._fcbd .Ser ,_efd );_efd .Idx .ValAttr =uint32 (len (_dgae ._fcbd .Ser )-1);_efd .Order .ValAttr =uint32 (len (_dgae ._fcbd .Ser )-1);
_dda :=RadarChartSeries {_efd };_dda .InitializeDefaults ();_dda .Properties ().SetSolidFill (_cec );return _dda ;};
2020-12-17 22:07:08 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_gfd Title )X ()*_fa .CT_Title {return _gfd ._bade };
2021-01-04 16:11:39 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_bf AreaChart )X ()*_fa .CT_AreaChart {return _bf ._bg };
2024-02-17 03:37:07 +00:00
2024-05-08 13:54:39 +00:00
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_fde *_fa .CT_LineSer };func MakeChart (x *_fa .ChartSpace )Chart {return Chart {x }};func (_ade ValueAxis )SetMinorTickMark (m _fa .ST_TickMark ){if m ==_fa .ST_TickMarkUnset {_ade ._ddf .MinorTickMark =nil ;}else {_ade ._ddf .MinorTickMark =_fa .NewCT_TickMark ();
_ade ._ddf .MinorTickMark .ValAttr =m ;};};
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to an Doughnut chart.
func (_cfg DoughnutChart )AddSeries ()PieChartSeries {_gba :=_fa .NewCT_PieSer ();_cfg ._abd .Ser =append (_cfg ._abd .Ser ,_gba );_gba .Idx .ValAttr =uint32 (len (_cfg ._abd .Ser )-1);_gba .Order .ValAttr =uint32 (len (_cfg ._abd .Ser )-1);_egc :=PieChartSeries {_gba };
_egc .InitializeDefaults ();return _egc ;};func (_gdc RadarChart )AddAxis (axis Axis ){_fgc :=_fa .NewCT_UnsignedInt ();_fgc .ValAttr =axis .AxisID ();_gdc ._fcbd .AxId =append (_gdc ._fcbd .AxId ,_fgc );};type Line3DChart struct{chartBase ;_dgc *_fa .CT_Line3DChart ;
};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_dd *_fa .CT_Bar3DChart ;};func (_ffeb SurfaceChart )InitializeDefaults (){_ffeb ._fada .Wireframe =_fa .NewCT_Boolean ();_ffeb ._fada .Wireframe .ValAttr =_e .Bool (false );_ffeb ._fada .BandFmts =_fa .NewCT_BandFmts ();
for _ega :=0;_ega < 15;_ega ++{_dgab :=_fa .NewCT_BandFmt ();_dgab .Idx .ValAttr =uint32 (_ega );_dgab .SpPr =_g .NewCT_ShapeProperties ();_fdf :=_d .MakeShapeProperties (_dgab .SpPr );_fdf .SetSolidFill (_ffeb .nextColor (_ega ));_ffeb ._fada .BandFmts .BandFmt =append (_ffeb ._fada .BandFmts .BandFmt ,_dgab );
};};func MakeLegend (l *_fa .CT_Legend )Legend {return Legend {l }};type nullAxis byte ;
2024-05-04 18:48:06 +00:00
// AddRadarChart adds a new radar chart to a chart.
2024-05-08 13:54:39 +00:00
func (_gbf Chart )AddRadarChart ()RadarChart {_abb :=_fa .NewCT_PlotAreaChoice ();_gbf ._fcg .Chart .PlotArea .Choice =append (_gbf ._fcg .Chart .PlotArea .Choice ,_abb );_abb .RadarChart =_fa .NewCT_RadarChart ();_fee :=RadarChart {_fcbd :_abb .RadarChart };
_fee .InitializeDefaults ();return _fee ;};
2023-04-15 17:27:31 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults the bar chart to its defaults
func (_gace RadarChart )InitializeDefaults (){_gace ._fcbd .RadarStyle .ValAttr =_fa .ST_RadarStyleMarker ;};
2024-02-17 03:37:07 +00:00
2024-05-08 13:54:39 +00:00
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_dbde *_fa .CT_RadarSer };
2024-02-17 03:37:07 +00:00
2024-05-08 13:54:39 +00:00
// CategoryAxis returns the category data source.
func (_da AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _da ._ff .Cat ==nil {_da ._ff .Cat =_fa .NewCT_AxDataSource ();};return MakeAxisDataSource (_da ._ff .Cat );};func MakeMarker (x *_fa .CT_Marker )Marker {return Marker {x }};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to an area chart.
func (_gg Area3DChart )AddSeries ()AreaChartSeries {_ga :=_gg .nextColor (len (_gg ._fgb .Ser ));_c :=_fa .NewCT_AreaSer ();_gg ._fgb .Ser =append (_gg ._fgb .Ser ,_c );_c .Idx .ValAttr =uint32 (len (_gg ._fgb .Ser )-1);_c .Order .ValAttr =uint32 (len (_gg ._fgb .Ser )-1);
_fda :=AreaChartSeries {_c };_fda .InitializeDefaults ();_fda .Properties ().SetSolidFill (_ga );return _fda ;};func (_cd CategoryAxis )InitializeDefaults (){_cd .SetPosition (_fa .ST_AxPosB );_cd .SetMajorTickMark (_fa .ST_TickMarkOut );_cd .SetMinorTickMark (_fa .ST_TickMarkIn );
_cd .SetTickLabelPosition (_fa .ST_TickLblPosNextTo );_cd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fac .LightGray );_cd .Properties ().LineProperties ().SetSolidFill (_fac .Black );};func (_ebe nullAxis )AxisID ()uint32 {return 0};
2024-02-17 03:37:07 +00:00
2021-05-31 16:22:30 +00:00
2024-05-08 13:54:39 +00:00
// SetOrder sets the order of the series
func (_debd SurfaceChartSeries )SetOrder (idx uint32 ){_debd ._ggf .Order .ValAttr =idx };
// Properties returns the bar chart series shape properties.
func (_fcef PieChartSeries )Properties ()_d .ShapeProperties {if _fcef ._dgb .SpPr ==nil {_fcef ._dgb .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_fcef ._dgb .SpPr );};
// Order returns the order of the series
func (_fdaa LineChartSeries )Order ()uint32 {return _fdaa ._fde .Order .ValAttr };
// InitializeDefaults the bar chart to its defaults
func (_bgce DoughnutChart )InitializeDefaults (){_bgce ._abd .VaryColors =_fa .NewCT_Boolean ();_bgce ._abd .VaryColors .ValAttr =_e .Bool (true );_bgce ._abd .HoleSize =_fa .NewCT_HoleSize ();_bgce ._abd .HoleSize .ValAttr =&_fa .ST_HoleSize {};_bgce ._abd .HoleSize .ValAttr .ST_HoleSizeUByte =_e .Uint8 (50);
};type ValueAxis struct{_ddf *_fa .CT_ValAx };
2021-05-31 16:22:30 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_fgca SurfaceChartSeries )X ()*_fa .CT_SurfaceSer {return _fgca ._ggf };func MakeCategoryAxis (x *_fa .CT_CatAx )CategoryAxis {return CategoryAxis {x }};func (_geg DataLabels )SetPosition (p _fa .ST_DLblPos ){_geg .ensureChoice ();_geg ._gfgg .Choice .DLblPos =_fa .NewCT_DLblPos ();
_geg ._gfgg .Choice .DLblPos .ValAttr =p ;};
2023-08-06 17:57:53 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to a Surface chart.
func (_dfgf SurfaceChart )AddSeries ()SurfaceChartSeries {_dbf :=_dfgf .nextColor (len (_dfgf ._fada .Ser ));_gee :=_fa .NewCT_SurfaceSer ();_dfgf ._fada .Ser =append (_dfgf ._fada .Ser ,_gee );_gee .Idx .ValAttr =uint32 (len (_dfgf ._fada .Ser )-1);_gee .Order .ValAttr =uint32 (len (_dfgf ._fada .Ser )-1);
_fdcdfd :=SurfaceChartSeries {_gee };_fdcdfd .InitializeDefaults ();_fdcdfd .Properties ().LineProperties ().SetSolidFill (_dbf );return _fdcdfd ;};func (_bfa CategoryAxis )SetMinorTickMark (m _fa .ST_TickMark ){if m ==_fa .ST_TickMarkUnset {_bfa ._bfgc .MinorTickMark =nil ;
}else {_bfa ._bfgc .MinorTickMark =_fa .NewCT_TickMark ();_bfa ._bfgc .MinorTickMark .ValAttr =m ;};};func (_cbbcf Title )InitializeDefaults (){_cbbcf .SetText ("\u0054\u0069\u0074l\u0065");_cbbcf .RunProperties ().SetSize (16*_fd .Point );_cbbcf .RunProperties ().SetSolidFill (_fac .Black );
_cbbcf .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_cbbcf .RunProperties ().SetBold (false );};
2021-11-10 11:45:21 +00:00
2024-05-08 13:54:39 +00:00
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_fcb *_fa .CT_PieChart ;};
2021-11-10 11:45:21 +00:00
2024-05-08 13:54:39 +00:00
// SetText sets the series text.
func (_gff PieChartSeries )SetText (s string ){_gff ._dgb .Tx =_fa .NewCT_SerTx ();_gff ._dgb .Tx .Choice .V =&s ;};func (_fedf DataLabels )SetShowLeaderLines (b bool ){_fedf .ensureChoice ();_fedf ._gfgg .Choice .ShowLeaderLines =_fa .NewCT_Boolean ();
_fedf ._gfgg .Choice .ShowLeaderLines .ValAttr =_e .Bool (b );};func (_feed LineChartSeries )Values ()NumberDataSource {if _feed ._fde .Val ==nil {_feed ._fde .Val =_fa .NewCT_NumDataSource ();};return MakeNumberDataSource (_feed ._fde .Val );};
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_gcgg ScatterChartSeries )X ()*_fa .CT_ScatterSer {return _gcgg ._bfcd };
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// AddAreaChart adds a new area chart to a chart.
func (_dcd Chart )AddAreaChart ()AreaChart {_edf :=_fa .NewCT_PlotAreaChoice ();_dcd ._fcg .Chart .PlotArea .Choice =append (_dcd ._fcg .Chart .PlotArea .Choice ,_edf );_edf .AreaChart =_fa .NewCT_AreaChart ();_faf :=AreaChart {_bg :_edf .AreaChart };_faf .InitializeDefaults ();
return _faf ;};func (_gca LineChartSeries )SetSmooth (b bool ){_gca ._fde .Smooth =_fa .NewCT_Boolean ();_gca ._fde .Smooth .ValAttr =&b ;};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to a bar chart.
func (_gcd Bar3DChart )AddSeries ()BarChartSeries {_gae :=_gcd .nextColor (len (_gcd ._dd .Ser ));_ea :=_fa .NewCT_BarSer ();_gcd ._dd .Ser =append (_gcd ._dd .Ser ,_ea );_ea .Idx .ValAttr =uint32 (len (_gcd ._dd .Ser )-1);_ea .Order .ValAttr =uint32 (len (_gcd ._dd .Ser )-1);
_ed :=BarChartSeries {_ea };_ed .InitializeDefaults ();_ed .Properties ().SetSolidFill (_gae );return _ed ;};type NumberDataSource struct{_fdg *_fa .CT_NumDataSource };func (_bb BarChart )AddAxis (axis Axis ){_af :=_fa .NewCT_UnsignedInt ();_af .ValAttr =axis .AxisID ();
_bb ._eg .AxId =append (_bb ._eg .AxId ,_af );};func (_ggdf Marker )Properties ()_d .ShapeProperties {if _ggdf ._gfb .SpPr ==nil {_ggdf ._gfb .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_ggdf ._gfb .SpPr );};
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_gfg Chart )X ()*_fa .ChartSpace {return _gfg ._fcg };type LineChart struct{chartBase ;_dbb *_fa .CT_LineChart ;};
2021-11-10 11:45:21 +00:00
2024-05-08 13:54:39 +00:00
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_fgb *_fa .CT_Area3DChart ;};
2021-01-04 16:11:39 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults initializes an Radar series to the default values.
func (_gaef RadarChartSeries )InitializeDefaults (){};type CategoryAxis struct{_bfgc *_fa .CT_CatAx };func (_gdd AreaChart )AddAxis (axis Axis ){_dc :=_fa .NewCT_UnsignedInt ();_dc .ValAttr =axis .AxisID ();_gdd ._bg .AxId =append (_gdd ._bg .AxId ,_dc );
};func (_dgce Title )SetText (s string ){if _dgce ._bade .Tx ==nil {_dgce ._bade .Tx =_fa .NewCT_Tx ();};if _dgce ._bade .Tx .Choice .Rich ==nil {_dgce ._bade .Tx .Choice .Rich =_g .NewCT_TextBody ();};var _eae *_g .CT_TextParagraph ;if len (_dgce ._bade .Tx .Choice .Rich .P )==0{_eae =_g .NewCT_TextParagraph ();
_dgce ._bade .Tx .Choice .Rich .P =[]*_g .CT_TextParagraph {_eae };}else {_eae =_dgce ._bade .Tx .Choice .Rich .P [0];};var _gad *_g .EG_TextRun ;if len (_eae .EG_TextRun )==0{_gad =_g .NewEG_TextRun ();_eae .EG_TextRun =[]*_g .EG_TextRun {_gad };}else {_gad =_eae .EG_TextRun [0];
};if _gad .R ==nil {_gad .R =_g .NewCT_RegularTextRun ();};_gad .R .T =s ;};
2023-07-04 11:04:03 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_gbd PieChart )X ()*_fa .CT_PieChart {return _gbd ._fcb };
2023-08-06 17:57:53 +00:00
2024-05-08 13:54:39 +00:00
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_fada *_fa .CT_SurfaceChart ;};func (_geaa ScatterChartSeries )Values ()NumberDataSource {if _geaa ._bfcd .YVal ==nil {_geaa ._bfcd .YVal =_fa .NewCT_NumDataSource ();};return MakeNumberDataSource (_geaa ._bfcd .YVal );
};func (_ffe DateAxis )SetTickLabelPosition (p _fa .ST_TickLblPos ){if p ==_fa .ST_TickLblPosUnset {_ffe ._fce .TickLblPos =nil ;}else {_ffe ._fce .TickLblPos =_fa .NewCT_TickLblPos ();_ffe ._fce .TickLblPos .ValAttr =p ;};};
2023-12-12 23:20:29 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to a Stock chart.
func (_dce StockChart )AddSeries ()LineChartSeries {_fca :=_fa .NewCT_LineSer ();_dce ._aged .Ser =append (_dce ._aged .Ser ,_fca );_fca .Idx .ValAttr =uint32 (len (_dce ._aged .Ser )-1);_fca .Order .ValAttr =uint32 (len (_dce ._aged .Ser )-1);_afc :=LineChartSeries {_fca };
_afc .Values ().CreateEmptyNumberCache ();_afc .Properties ().LineProperties ().SetNoFill ();return _afc ;};func (_cda SeriesAxis )AxisID ()uint32 {return _cda ._cecc .AxId .ValAttr };func (_adeg ValueAxis )Properties ()_d .ShapeProperties {if _adeg ._ddf .SpPr ==nil {_adeg ._ddf .SpPr =_g .NewCT_ShapeProperties ();
};return _d .MakeShapeProperties (_adeg ._ddf .SpPr );};type SeriesAxis struct{_cecc *_fa .CT_SerAx };type SurfaceChartSeries struct{_ggf *_fa .CT_SurfaceSer };
2023-12-12 23:20:29 +00:00
2024-05-08 13:54:39 +00:00
// RemoveTitle removes any existing title from the chart.
func (_aaf Chart )RemoveTitle (){_aaf ._fcg .Chart .Title =nil ;_aaf ._fcg .Chart .AutoTitleDeleted =_fa .NewCT_Boolean ();_aaf ._fcg .Chart .AutoTitleDeleted .ValAttr =_e .Bool (true );};func (_ebg DataLabels )SetShowValue (b bool ){_ebg .ensureChoice ();
_ebg ._gfgg .Choice .ShowVal =_fa .NewCT_Boolean ();_ebg ._gfgg .Choice .ShowVal .ValAttr =_e .Bool (b );};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults initializes an area series to the default values.
func (_ggb AreaChartSeries )InitializeDefaults (){};
2020-08-23 14:15:53 +00:00
2024-05-08 13:54:39 +00:00
// AddBarChart adds a new bar chart to a chart.
func (_faa Chart )AddBarChart ()BarChart {_fed :=_fa .NewCT_PlotAreaChoice ();_faa ._fcg .Chart .PlotArea .Choice =append (_faa ._fcg .Chart .PlotArea .Choice ,_fed );_fed .BarChart =_fa .NewCT_BarChart ();_fed .BarChart .Grouping =_fa .NewCT_BarGrouping ();
_fed .BarChart .Grouping .ValAttr =_fa .ST_BarGroupingStandard ;_add :=BarChart {_eg :_fed .BarChart };_add .InitializeDefaults ();return _add ;};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// AddAxis adds an axis to a line chart.
func (_cfe LineChart )AddAxis (axis Axis ){_aef :=_fa .NewCT_UnsignedInt ();_aef .ValAttr =axis .AxisID ();_cfe ._dbb .AxId =append (_cfe ._dbb .AxId ,_aef );};func (_gde NumberDataSource )SetReference (s string ){_gde .ensureChoice ();if _gde ._fdg .Choice .NumRef ==nil {_gde ._fdg .Choice .NumRef =_fa .NewCT_NumRef ();
};_gde ._fdg .Choice .NumRef .F =s ;};
2021-01-04 16:11:39 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_fff LineChartSeries )X ()*_fa .CT_LineSer {return _fff ._fde };
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// RemoveLegend removes the legend if the chart has one.
func (_ddge Chart )RemoveLegend (){_ddge ._fcg .Chart .Legend =nil };func (_cgf DataLabels )SetShowLegendKey (b bool ){_cgf .ensureChoice ();_cgf ._gfgg .Choice .ShowLegendKey =_fa .NewCT_Boolean ();_cgf ._gfgg .Choice .ShowLegendKey .ValAttr =_e .Bool (b );
2024-05-04 18:48:06 +00:00
};
2024-05-08 13:54:39 +00:00
// CategoryAxis returns the category data source.
func (_faff RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _faff ._dbde .Cat ==nil {_faff ._dbde .Cat =_fa .NewCT_AxDataSource ();};return MakeAxisDataSource (_faff ._dbde .Cat );};
2023-09-16 17:56:36 +00:00
2024-05-08 13:54:39 +00:00
// Index returns the index of the series
func (_ccag SurfaceChartSeries )Index ()uint32 {return _ccag ._ggf .Idx .ValAttr };
2021-04-23 20:00:00 +00:00
2024-05-08 13:54:39 +00:00
// AddAxis adds an axis to a Surface chart.
func (_ffd Surface3DChart )AddAxis (axis Axis ){_afg :=_fa .NewCT_UnsignedInt ();_afg .ValAttr =axis .AxisID ();_ffd ._bda .AxId =append (_ffd ._bda .AxId ,_afg );};
2021-07-30 17:03:26 +00:00
2024-05-08 13:54:39 +00:00
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_dgb *_fa .CT_PieSer };
2021-09-22 16:41:01 +00:00
2024-05-08 13:54:39 +00:00
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_dbg DoughnutChart )SetHoleSize (pct uint8 ){if _dbg ._abd .HoleSize ==nil {_dbg ._abd .HoleSize =_fa .NewCT_HoleSize ();};if _dbg ._abd .HoleSize .ValAttr ==nil {_dbg ._abd .HoleSize .ValAttr =&_fa .ST_HoleSize {};};_dbg ._abd .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;
};func (_fcgg ValueAxis )SetPosition (p _fa .ST_AxPos ){_fcgg ._ddf .AxPos =_fa .NewCT_AxPos ();_fcgg ._ddf .AxPos .ValAttr =p ;};func (_gf CategoryAxis )SetCrosses (axis Axis ){_gf ._bfgc .Choice =_fa .NewEG_AxSharedChoice ();_gf ._bfgc .Choice .Crosses =_fa .NewCT_Crosses ();
_gf ._bfgc .Choice .Crosses .ValAttr =_fa .ST_CrossesAutoZero ;_gf ._bfgc .CrossAx .ValAttr =axis .AxisID ();};func (_ddc Bar3DChart )AddAxis (axis Axis ){_cbb :=_fa .NewCT_UnsignedInt ();_cbb .ValAttr =axis .AxisID ();_ddc ._dd .AxId =append (_ddc ._dd .AxId ,_cbb );
};
2022-01-15 21:17:38 +00:00
2024-05-08 13:54:39 +00:00
// Properties returns the Bubble chart series shape properties.
func (_acb BubbleChartSeries )Properties ()_d .ShapeProperties {if _acb ._bd .SpPr ==nil {_acb ._bd .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_acb ._bd .SpPr );};func (_aae NumberDataSource )ensureChoice (){if _aae ._fdg .Choice ==nil {_aae ._fdg .Choice =_fa .NewCT_NumDataSourceChoice ();
};};
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// SetText sets the series text.
func (_ac AreaChartSeries )SetText (s string ){_ac ._ff .Tx =_fa .NewCT_SerTx ();_ac ._ff .Tx .Choice .V =&s ;};type DataLabels struct{_gfgg *_fa .CT_DLbls };func (_gac DateAxis )SetMinorTickMark (m _fa .ST_TickMark ){if m ==_fa .ST_TickMarkUnset {_gac ._fce .MinorTickMark =nil ;
}else {_gac ._fce .MinorTickMark =_fa .NewCT_TickMark ();_gac ._fce .MinorTickMark .ValAttr =m ;};};
2023-06-10 07:12:37 +00:00
2024-05-08 13:54:39 +00:00
// SetText sets the series text.
func (_ebf BarChartSeries )SetText (s string ){_ebf ._bc .Tx =_fa .NewCT_SerTx ();_ebf ._bc .Tx .Choice .V =&s ;};
2023-07-04 11:04:03 +00:00
2024-05-08 13:54:39 +00:00
// Properties returns the bar chart series shape properties.
func (_cga BarChartSeries )Properties ()_d .ShapeProperties {if _cga ._bc .SpPr ==nil {_cga ._bc .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_cga ._bc .SpPr );};func (_aeg CategoryAxis )SetTickLabelPosition (p _fa .ST_TickLblPos ){if p ==_fa .ST_TickLblPosUnset {_aeg ._bfgc .TickLblPos =nil ;
}else {_aeg ._bfgc .TickLblPos =_fa .NewCT_TickLblPos ();_aeg ._bfgc .TickLblPos .ValAttr =p ;};};
2023-08-06 17:57:53 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_dg BubbleChart )X ()*_fa .CT_BubbleChart {return _dg ._bbc };
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// InitializeDefaults the bar chart to its defaults
func (_beb Pie3DChart )InitializeDefaults (){_beb ._dgdf .VaryColors =_fa .NewCT_Boolean ();_beb ._dgdf .VaryColors .ValAttr =_e .Bool (true );};
2022-12-06 11:56:49 +00:00
2024-05-08 13:54:39 +00:00
// SetType sets the type the secone pie to either pie or bar
func (_ege PieOfPieChart )SetType (t _fa .ST_OfPieType ){_ege ._cdf .OfPieType .ValAttr =t };
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// AddPie3DChart adds a new pie chart to a chart.
func (_ddb Chart )AddPie3DChart ()Pie3DChart {_ageb (_ddb ._fcg .Chart );_bdf :=_fa .NewCT_PlotAreaChoice ();_ddb ._fcg .Chart .PlotArea .Choice =append (_ddb ._fcg .Chart .PlotArea .Choice ,_bdf );_bdf .Pie3DChart =_fa .NewCT_Pie3DChart ();_ddbc :=Pie3DChart {_dgdf :_bdf .Pie3DChart };
_ddbc .InitializeDefaults ();return _ddbc ;};func (_cgdb Marker )SetSymbol (s _fa .ST_MarkerStyle ){if s ==_fa .ST_MarkerStyleUnset {_cgdb ._gfb .Symbol =nil ;}else {_cgdb ._gfb .Symbol =_fa .NewCT_MarkerStyle ();_cgdb ._gfb .Symbol .ValAttr =s ;};};func (_bfgf ScatterChartSeries )InitializeDefaults (){_bfgf .Properties ().LineProperties ().SetNoFill ();
_bfgf .Marker ().SetSymbol (_fa .ST_MarkerStyleAuto );_bfgf .Labels ().SetShowLegendKey (false );_bfgf .Labels ().SetShowValue (true );_bfgf .Labels ().SetShowPercent (false );_bfgf .Labels ().SetShowCategoryName (false );_bfgf .Labels ().SetShowSeriesName (false );
_bfgf .Labels ().SetShowLeaderLines (false );};
2023-03-01 18:42:44 +00:00
2024-05-08 13:54:39 +00:00
// Labels returns the data label properties.
func (_eab LineChartSeries )Labels ()DataLabels {if _eab ._fde .DLbls ==nil {_eab ._fde .DLbls =_fa .NewCT_DLbls ();};return MakeDataLabels (_eab ._fde .DLbls );};type GridLines struct{_cge *_fa .CT_ChartLines };
2023-12-28 15:53:06 +00:00
2024-05-04 18:48:06 +00:00
// Pie3DChart is a Pie3D chart.
2024-05-08 13:54:39 +00:00
type Pie3DChart struct{chartBase ;_dgdf *_fa .CT_Pie3DChart ;};
// AddScatterChart adds a scatter (X/Y) chart.
func (_gdf Chart )AddScatterChart ()ScatterChart {_debg :=_fa .NewCT_PlotAreaChoice ();_gdf ._fcg .Chart .PlotArea .Choice =append (_gdf ._fcg .Chart .PlotArea .Choice ,_debg );_debg .ScatterChart =_fa .NewCT_ScatterChart ();_gfa :=ScatterChart {_daa :_debg .ScatterChart };
_gfa .InitializeDefaults ();return _gfa ;};
// AddDateAxis adds a value axis to the chart.
func (_adb Chart )AddDateAxis ()DateAxis {_afb :=_fa .NewCT_DateAx ();if _adb ._fcg .Chart .PlotArea .CChoice ==nil {_adb ._fcg .Chart .PlotArea .CChoice =_fa .NewCT_PlotAreaChoice1 ();};_afb .AxId =_fa .NewCT_UnsignedInt ();_afb .AxId .ValAttr =0x7FFFFFFF&_fg .Uint32 ();
_adb ._fcg .Chart .PlotArea .CChoice .DateAx =append (_adb ._fcg .Chart .PlotArea .CChoice .DateAx ,_afb );_afb .Delete =_fa .NewCT_Boolean ();_afb .Delete .ValAttr =_e .Bool (false );_afb .Scaling =_fa .NewCT_Scaling ();_afb .Scaling .Orientation =_fa .NewCT_Orientation ();
_afb .Scaling .Orientation .ValAttr =_fa .ST_OrientationMinMax ;_afb .Choice =&_fa .EG_AxSharedChoice {};_afb .Choice .Crosses =_fa .NewCT_Crosses ();_afb .Choice .Crosses .ValAttr =_fa .ST_CrossesAutoZero ;_ace :=DateAxis {_afb };_ace .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_fac .LightGray );
_ace .SetMajorTickMark (_fa .ST_TickMarkOut );_ace .SetMinorTickMark (_fa .ST_TickMarkIn );_ace .SetTickLabelPosition (_fa .ST_TickLblPosNextTo );_ace .Properties ().LineProperties ().SetSolidFill (_fac .Black );_ace .SetPosition (_fa .ST_AxPosL );return _ace ;
};func (_agf DateAxis )SetCrosses (axis Axis ){_agf ._fce .CrossAx .ValAttr =axis .AxisID ()};var _aebe =[]_fac .Color {_fac .RGB (0x33,0x66,0xcc),_fac .RGB (0xDC,0x39,0x12),_fac .RGB (0xFF,0x99,0x00),_fac .RGB (0x10,0x96,0x18),_fac .RGB (0x99,0x00,0x99),_fac .RGB (0x3B,0x3E,0xAC),_fac .RGB (0x00,0x99,0xC6),_fac .RGB (0xDD,0x44,0x77),_fac .RGB (0x66,0xAA,0x00),_fac .RGB (0xB8,0x2E,0x2E),_fac .RGB (0x31,0x63,0x95),_fac .RGB (0x99,0x44,0x99),_fac .RGB (0x22,0xAA,0x99),_fac .RGB (0xAA,0xAA,0x11),_fac .RGB (0x66,0x33,0xCC),_fac .RGB (0xE6,0x73,0x00),_fac .RGB (0x8B,0x07,0x07),_fac .RGB (0x32,0x92,0x62),_fac .RGB (0x55,0x74,0xA6),_fac .RGB (0x3B,0x3E,0xAC)};
2023-12-28 15:53:06 +00:00
2023-07-04 11:04:03 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_bfg Bar3DChart )X ()*_fa .CT_Bar3DChart {return _bfg ._dd };
2023-09-16 17:56:36 +00:00
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_fcf PieOfPieChart )X ()*_fa .CT_OfPieChart {return _fcf ._cdf };
2023-09-16 17:56:36 +00:00
2024-05-08 13:54:39 +00:00
// SetText sets the series text
func (_adad SurfaceChartSeries )SetText (s string ){_adad ._ggf .Tx =_fa .NewCT_SerTx ();_adad ._ggf .Tx .Choice .V =&s ;};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// Values returns the value data source.
func (_ddd BarChartSeries )Values ()NumberDataSource {if _ddd ._bc .Val ==nil {_ddd ._bc .Val =_fa .NewCT_NumDataSource ();};return MakeNumberDataSource (_ddd ._bc .Val );};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// AddBubbleChart adds a new bubble chart.
func (_cbbc Chart )AddBubbleChart ()BubbleChart {_dab :=_fa .NewCT_PlotAreaChoice ();_cbbc ._fcg .Chart .PlotArea .Choice =append (_cbbc ._fcg .Chart .PlotArea .Choice ,_dab );_dab .BubbleChart =_fa .NewCT_BubbleChart ();_efg :=BubbleChart {_bbc :_dab .BubbleChart };
_efg .InitializeDefaults ();return _efg ;};
2024-02-17 03:37:07 +00:00
2024-05-08 13:54:39 +00:00
// AddSeries adds a default series to an Pie chart.
func (_gec PieOfPieChart )AddSeries ()PieChartSeries {_dfff :=_fa .NewCT_PieSer ();_gec ._cdf .Ser =append (_gec ._cdf .Ser ,_dfff );_dfff .Idx .ValAttr =uint32 (len (_gec ._cdf .Ser )-1);_dfff .Order .ValAttr =uint32 (len (_gec ._cdf .Ser )-1);_gea :=PieChartSeries {_dfff };
_gea .InitializeDefaults ();return _gea ;};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// AddLineChart adds a new line chart to a chart.
func (_deb Chart )AddLineChart ()LineChart {_ec :=_fa .NewCT_PlotAreaChoice ();_deb ._fcg .Chart .PlotArea .Choice =append (_deb ._fcg .Chart .PlotArea .Choice ,_ec );_ec .LineChart =_fa .NewCT_LineChart ();_ec .LineChart .Grouping =_fa .NewCT_Grouping ();
_ec .LineChart .Grouping .ValAttr =_fa .ST_GroupingStandard ;return LineChart {_dbb :_ec .LineChart };};
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// Properties returns the bar chart series shape properties.
func (_bgg RadarChartSeries )Properties ()_d .ShapeProperties {if _bgg ._dbde .SpPr ==nil {_bgg ._dbde .SpPr =_g .NewCT_ShapeProperties ();};return _d .MakeShapeProperties (_bgg ._dbde .SpPr );};func (_dcf CategoryAxis )SetMajorTickMark (m _fa .ST_TickMark ){if m ==_fa .ST_TickMarkUnset {_dcf ._bfgc .MajorTickMark =nil ;
}else {_dcf ._bfgc .MajorTickMark =_fa .NewCT_TickMark ();_dcf ._bfgc .MajorTickMark .ValAttr =m ;};};
2023-12-12 23:20:29 +00:00
2024-05-08 13:54:39 +00:00
// AddTitle sets a new title on the chart.
func (_fdcdf Chart )AddTitle ()Title {_fdcdf ._fcg .Chart .Title =_fa .NewCT_Title ();_fdcdf ._fcg .Chart .Title .Overlay =_fa .NewCT_Boolean ();_fdcdf ._fcg .Chart .Title .Overlay .ValAttr =_e .Bool (false );_fdcdf ._fcg .Chart .AutoTitleDeleted =_fa .NewCT_Boolean ();
_fdcdf ._fcg .Chart .AutoTitleDeleted .ValAttr =_e .Bool (false );_bag :=MakeTitle (_fdcdf ._fcg .Chart .Title );_bag .InitializeDefaults ();return _bag ;};
2024-05-08 13:54:39 +00:00
// X returns the inner wrapped XML type.
func (_fdb AreaChartSeries )X ()*_fa .CT_AreaSer {return _fdb ._ff };func (_ccg ValueAxis )AxisID ()uint32 {return _ccg ._ddf .AxId .ValAttr };
2024-05-08 13:54:39 +00:00
// InitializeDefaults initializes an Pie series to the default values.
func (_aeed PieChartSeries )InitializeDefaults (){};
2023-12-28 15:53:06 +00:00
2024-05-08 13:54:39 +00:00
// Values returns the bubble size data source.
func (_df BubbleChartSeries )BubbleSizes ()NumberDataSource {if _df ._bd .BubbleSize ==nil {_df ._bd .BubbleSize =_fa .NewCT_NumDataSource ();};return MakeNumberDataSource (_df ._bd .BubbleSize );};
2023-12-28 15:53:06 +00:00
2024-02-17 03:37:07 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_bed ScatterChart )X ()*_fa .CT_ScatterChart {return _bed ._daa };
// InitializeDefaults the bar chart to its defaults
func (_gab PieChart )InitializeDefaults (){_gab ._fcb .VaryColors =_fa .NewCT_Boolean ();_gab ._fcb .VaryColors .ValAttr =_e .Bool (true );};
// AddSeries adds a default series to a line chart.
func (_cad Line3DChart )AddSeries ()LineChartSeries {_eeb :=_cad .nextColor (len (_cad ._dgc .Ser ));_dee :=_fa .NewCT_LineSer ();_cad ._dgc .Ser =append (_cad ._dgc .Ser ,_dee );_dee .Idx .ValAttr =uint32 (len (_cad ._dgc .Ser )-1);_dee .Order .ValAttr =uint32 (len (_cad ._dgc .Ser )-1);
_bad :=LineChartSeries {_dee };_bad .InitializeDefaults ();_bad .Properties ().LineProperties ().SetSolidFill (_eeb );_bad .Properties ().SetSolidFill (_eeb );return _bad ;};
2023-12-12 23:20:29 +00:00
2024-05-04 18:48:06 +00:00
// X returns the inner wrapped XML type.
2024-05-08 13:54:39 +00:00
func (_aed Line3DChart )X ()*_fa .CT_Line3DChart {return _aed ._dgc };type Marker struct{_gfb *_fa .CT_Marker };func _ageb (_bgb *_fa .CT_Chart ){_bgb .View3D =_fa .NewCT_View3D ();_bgb .View3D .RotX =_fa .NewCT_RotX ();_bgb .View3D .RotX .ValAttr =_e .Int8 (15);
_bgb .View3D .RotY =_fa .NewCT_RotY ();_bgb .View3D .RotY .ValAttr =_e .Uint16 (20);_bgb .View3D .RAngAx =_fa .NewCT_Boolean ();_bgb .View3D .RAngAx .ValAttr =_e .Bool (false );_bgb .Floor =_fa .NewCT_Surface ();_bgb .Floor .Thickness =_fa .NewCT_Thickness ();
_bgb .Floor .Thickness .ValAttr .Uint32 =_e .Uint32 (0);_bgb .SideWall =_fa .NewCT_Surface ();_bgb .SideWall .Thickness =_fa .NewCT_Thickness ();_bgb .SideWall .Thickness .ValAttr .Uint32 =_e .Uint32 (0);_bgb .BackWall =_fa .NewCT_Surface ();_bgb .BackWall .Thickness =_fa .NewCT_Thickness ();
_bgb .BackWall .Thickness .ValAttr .Uint32 =_e .Uint32 (0);};
2023-12-12 23:20:29 +00:00
2024-05-08 13:54:39 +00:00
// SetIndex sets the index of the series
func (_ggde ScatterChartSeries )SetIndex (idx uint32 ){_ggde ._bfcd .Idx .ValAttr =idx };func (_bce ScatterChartSeries )SetSmooth (b bool ){_bce ._bfcd .Smooth =_fa .NewCT_Boolean ();_bce ._bfcd .Smooth .ValAttr =&b ;};
2024-05-08 13:54:39 +00:00
// AddArea3DChart adds a new area chart to a chart.
func (_fbg Chart )AddArea3DChart ()Area3DChart {_ageb (_fbg ._fcg .Chart );_ddg :=_fa .NewCT_PlotAreaChoice ();_fbg ._fcg .Chart .PlotArea .Choice =append (_fbg ._fcg .Chart .PlotArea .Choice ,_ddg );_ddg .Area3DChart =_fa .NewCT_Area3DChart ();_bba :=Area3DChart {_fgb :_ddg .Area3DChart };
_bba .InitializeDefaults ();return _bba ;};