2017-09-03 16:47:46 -05:00
|
|
|
//
|
2020-08-23 14:15:53 +00:00
|
|
|
// Copyright 2020 FoxyUtils ehf. All rights reserved.
|
|
|
|
//
|
|
|
|
// This is a commercial product and requires a license to operate.
|
|
|
|
// A trial license can be obtained at https://unidoc.io
|
|
|
|
//
|
|
|
|
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by the UniDoc End User License Agreement
|
|
|
|
// terms that can be accessed at https://unidoc.io/eula/
|
2017-09-03 16:47:46 -05:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
package chart ;import (_ec "fmt";_dd "github.com/unidoc/unioffice";_ga "github.com/unidoc/unioffice/color";_f "github.com/unidoc/unioffice/drawing";_d "github.com/unidoc/unioffice/measurement";_ge "github.com/unidoc/unioffice/schema/soo/dml";_a "github.com/unidoc/unioffice/schema/soo/dml/chart";
|
|
|
|
_g "math/rand";);
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddBarChart adds a new bar chart to a chart.
|
|
|
|
func (_aeb Chart )AddBarChart ()BarChart {_ebg :=_a .NewCT_PlotAreaChoice ();_aeb ._eag .Chart .PlotArea .Choice =append (_aeb ._eag .Chart .PlotArea .Choice ,_ebg );_ebg .BarChart =_a .NewCT_BarChart ();_ebg .BarChart .Grouping =_a .NewCT_BarGrouping ();
|
|
|
|
_ebg .BarChart .Grouping .ValAttr =_a .ST_BarGroupingStandard ;_efc :=BarChart {_ab :_ebg .BarChart };_efc .InitializeDefaults ();return _efc ;};
|
2023-04-15 17:27:31 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Area3DChart is an area chart that has a shaded area underneath a curve.
|
|
|
|
type Area3DChart struct{chartBase ;_c *_a .CT_Area3DChart ;};
|
2021-04-23 20:00:00 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Chart is a generic chart.
|
|
|
|
type Chart struct{_eag *_a .ChartSpace };
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddLegend adds a legend to a chart, replacing any existing legend.
|
|
|
|
func (_fac Chart )AddLegend ()Legend {_fac ._eag .Chart .Legend =_a .NewCT_Legend ();_bfb :=MakeLegend (_fac ._eag .Chart .Legend );_bfb .InitializeDefaults ();return _bfb ;};func (_dga BubbleChart )AddAxis (axis Axis ){_cba :=_a .NewCT_UnsignedInt ();
|
|
|
|
_cba .ValAttr =axis .AxisID ();_dga ._dg .AxId =append (_dga ._dg .AxId ,_cba );};func (_agf Title )InitializeDefaults (){_agf .SetText ("\u0054\u0069\u0074l\u0065");_agf .RunProperties ().SetSize (16*_d .Point );_agf .RunProperties ().SetSolidFill (_ga .Black );
|
|
|
|
_agf .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_agf .RunProperties ().SetBold (false );};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// SetText sets the series text.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_dfec PieChartSeries )SetText (s string ){_dfec ._eegg .Tx =_a .NewCT_SerTx ();_dfec ._eegg .Tx .Choice .V =&s ;};type Legend struct{_ggb *_a .CT_Legend };
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a bar chart.
|
|
|
|
func (_gad Bar3DChart )AddSeries ()BarChartSeries {_fe :=_gad .nextColor (len (_gad ._bb .Ser ));_eee :=_a .NewCT_BarSer ();_gad ._bb .Ser =append (_gad ._bb .Ser ,_eee );_eee .Idx .ValAttr =uint32 (len (_gad ._bb .Ser )-1);_eee .Order .ValAttr =uint32 (len (_gad ._bb .Ser )-1);
|
|
|
|
_ac :=BarChartSeries {_eee };_ac .InitializeDefaults ();_ac .Properties ().SetSolidFill (_fe );return _ac ;};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_cfba RadarChartSeries )Properties ()_f .ShapeProperties {if _cfba ._fcff .SpPr ==nil {_cfba ._fcff .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_cfba ._fcff .SpPr );};
|
2022-04-09 14:27:46 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Marker returns the marker properties.
|
|
|
|
func (_bdec ScatterChartSeries )Marker ()Marker {if _bdec ._gdg .Marker ==nil {_bdec ._gdg .Marker =_a .NewCT_Marker ();};return MakeMarker (_bdec ._gdg .Marker );};
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetText sets the series text
|
|
|
|
func (_bcdf LineChartSeries )SetText (s string ){_bcdf ._deg .Tx =_a .NewCT_SerTx ();_bcdf ._deg .Tx .Choice .V =&s ;};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// RadarChartSeries is a series to be used on an Radar chart.
|
|
|
|
type RadarChartSeries struct{_fcff *_a .CT_RadarSer };
|
2021-01-04 16:11:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_cb Bar3DChart )X ()*_a .CT_Bar3DChart {return _cb ._bb };
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Order returns the order of the series
|
|
|
|
func (_dfc ScatterChartSeries )Order ()uint32 {return _dfc ._gdg .Order .ValAttr };
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_feac PieOfPieChart )InitializeDefaults (){_feac ._bgcf .VaryColors =_a .NewCT_Boolean ();_feac ._bgcf .VaryColors .ValAttr =_dd .Bool (true );_feac .SetType (_a .ST_OfPieTypePie );_feac ._bgcf .SecondPieSize =_a .NewCT_SecondPieSize ();_feac ._bgcf .SecondPieSize .ValAttr =&_a .ST_SecondPieSize {};
|
|
|
|
_feac ._bgcf .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_dd .Uint16 (75);_cbbb :=_a .NewCT_ChartLines ();_cbbb .SpPr =_ge .NewCT_ShapeProperties ();_dcd :=_f .MakeShapeProperties (_cbbb .SpPr );_dcd .LineProperties ().SetSolidFill (_ga .Auto );_feac ._bgcf .SerLines =append (_feac ._bgcf .SerLines ,_cbbb );
|
|
|
|
};
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_dfd Bar3DChart )InitializeDefaults (){_dfd .SetDirection (_a .ST_BarDirCol )};
|
2021-04-23 20:00:00 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_afa BubbleChartSeries )X ()*_a .CT_BubbleSer {return _afa ._ea };
|
2017-09-07 09:27:41 -04:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_eff ScatterChart )X ()*_a .CT_ScatterChart {return _eff ._efb };
|
2021-08-23 20:44:48 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a Scatter chart.
|
|
|
|
func (_beee ScatterChart )AddSeries ()ScatterChartSeries {_cefa :=_beee .nextColor (len (_beee ._efb .Ser ));_bfd :=_a .NewCT_ScatterSer ();_beee ._efb .Ser =append (_beee ._efb .Ser ,_bfd );_bfd .Idx .ValAttr =uint32 (len (_beee ._efb .Ser )-1);_bfd .Order .ValAttr =uint32 (len (_beee ._efb .Ser )-1);
|
|
|
|
_agd :=ScatterChartSeries {_bfd };_agd .InitializeDefaults ();_agd .Marker ().Properties ().LineProperties ().SetSolidFill (_cefa );_agd .Marker ().Properties ().SetSolidFill (_cefa );return _agd ;};func (_gacc DateAxis )SetTickLabelPosition (p _a .ST_TickLblPos ){if p ==_a .ST_TickLblPosUnset {_gacc ._dacg .TickLblPos =nil ;
|
|
|
|
}else {_gacc ._dacg .TickLblPos =_a .NewCT_TickLblPos ();_gacc ._dacg .TickLblPos .ValAttr =p ;};};
|
|
|
|
|
|
|
|
// InitializeDefaults initializes a Bubble chart series to the default values.
|
|
|
|
func (_geb BubbleChartSeries )InitializeDefaults (){};func (_gac DataLabels )ensureChoice (){if _gac ._gae .Choice ==nil {_gac ._gae .Choice =_a .NewCT_DLblsChoice ();};};type DateAxis struct{_dacg *_a .CT_DateAx };
|
|
|
|
|
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_fafd ScatterChartSeries )SetIndex (idx uint32 ){_fafd ._gdg .Idx .ValAttr =idx };
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// Labels returns the data label properties.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_cbag LineChartSeries )Labels ()DataLabels {if _cbag ._deg .DLbls ==nil {_cbag ._deg .DLbls =_a .NewCT_DLbls ();};return MakeDataLabels (_cbag ._deg .DLbls );};func (_ebc ScatterChart )InitializeDefaults (){_ebc ._efb .ScatterStyle .ValAttr =_a .ST_ScatterStyleMarker ;
|
|
|
|
};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddAxis adds an axis to a Surface chart.
|
|
|
|
func (_fbf Surface3DChart )AddAxis (axis Axis ){_bbd :=_a .NewCT_UnsignedInt ();_bbd .ValAttr =axis .AxisID ();_fbf ._edeg .AxId =append (_fbf ._edeg .AxId ,_bbd );};
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddAxis adds an axis to a line chart.
|
|
|
|
func (_fbc LineChart )AddAxis (axis Axis ){_fga :=_a .NewCT_UnsignedInt ();_fga .ValAttr =axis .AxisID ();_fbc ._gda .AxId =append (_fbc ._gda .AxId ,_fga );};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_adb BubbleChart )X ()*_a .CT_BubbleChart {return _adb ._dg };type SurfaceChartSeries struct{_eaf *_a .CT_SurfaceSer };
|
2023-03-01 18:42:44 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_aaa AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _aaa ._af .Cat ==nil {_aaa ._af .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_aaa ._af .Cat );};
|
2022-02-05 13:05:36 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Order returns the order of the series
|
|
|
|
func (_cfdg SurfaceChartSeries )Order ()uint32 {return _cfdg ._eaf .Order .ValAttr };
|
2022-02-05 13:05:36 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bcg PieChart )X ()*_a .CT_PieChart {return _bcg ._fbb };
|
2021-08-23 20:44:48 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddScatterChart adds a scatter (X/Y) chart.
|
|
|
|
func (_eda Chart )AddScatterChart ()ScatterChart {_bba :=_a .NewCT_PlotAreaChoice ();_eda ._eag .Chart .PlotArea .Choice =append (_eda ._eag .Chart .PlotArea .Choice ,_bba );_bba .ScatterChart =_a .NewCT_ScatterChart ();_cfb :=ScatterChart {_efb :_bba .ScatterChart };
|
|
|
|
_cfb .InitializeDefaults ();return _cfb ;};
|
2021-08-23 20:44:48 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_eeeb PieChartSeries )X ()*_a .CT_PieSer {return _eeeb ._eegg };
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the Stock chart to its defaults
|
|
|
|
func (_cfe StockChart )InitializeDefaults (){_cfe ._gdd .HiLowLines =_a .NewCT_ChartLines ();_cfe ._gdd .UpDownBars =_a .NewCT_UpDownBars ();_cfe ._gdd .UpDownBars .GapWidth =_a .NewCT_GapAmount ();_cfe ._gdd .UpDownBars .GapWidth .ValAttr =&_a .ST_GapAmount {};
|
|
|
|
_cfe ._gdd .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_dd .Uint16 (150);_cfe ._gdd .UpDownBars .UpBars =_a .NewCT_UpDownBar ();_cfe ._gdd .UpDownBars .DownBars =_a .NewCT_UpDownBar ();};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_dbbc RadarChartSeries )X ()*_a .CT_RadarSer {return _dbbc ._fcff };type Line3DChart struct{chartBase ;_ffa *_a .CT_Line3DChart ;};func (_bbf Surface3DChart )InitializeDefaults (){_bbf ._edeg .Wireframe =_a .NewCT_Boolean ();_bbf ._edeg .Wireframe .ValAttr =_dd .Bool (false );
|
|
|
|
_bbf ._edeg .BandFmts =_a .NewCT_BandFmts ();for _gbba :=0;_gbba < 15;_gbba ++{_afdb :=_a .NewCT_BandFmt ();_afdb .Idx .ValAttr =uint32 (_gbba );_afdb .SpPr =_ge .NewCT_ShapeProperties ();_gaga :=_f .MakeShapeProperties (_afdb .SpPr );_gaga .SetSolidFill (_bbf .nextColor (_gbba ));
|
|
|
|
_bbf ._edeg .BandFmts .BandFmt =append (_bbf ._edeg .BandFmts .BandFmt ,_afdb );};};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// RemoveLegend removes the legend if the chart has one.
|
|
|
|
func (_ccc Chart )RemoveLegend (){_ccc ._eag .Chart .Legend =nil };
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetValues is used to set the source data to a set of values.
|
|
|
|
func (_egbc CategoryAxisDataSource )SetValues (v []string ){_egbc ._da .Choice =_a .NewCT_AxDataSourceChoice ();_egbc ._da .Choice .StrLit =_a .NewCT_StrData ();_egbc ._da .Choice .StrLit .PtCount =_a .NewCT_UnsignedInt ();_egbc ._da .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));
|
|
|
|
for _eba ,_gafg :=range v {_egbc ._da .Choice .StrLit .Pt =append (_egbc ._da .Choice .StrLit .Pt ,&_a .CT_StrVal {IdxAttr :uint32 (_eba ),V :_gafg });};};
|
|
|
|
|
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_cefb LineChartSeries )SetIndex (idx uint32 ){_cefb ._deg .Idx .ValAttr =idx };func (_agc Legend )Properties ()_f .ShapeProperties {if _agc ._ggb .SpPr ==nil {_agc ._ggb .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_agc ._ggb .SpPr );
|
2024-06-20 13:33:45 +00:00
|
|
|
};
|
2021-06-16 07:10:52 +00:00
|
|
|
|
2024-07-28 07:48:26 +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{_da *_a .CT_AxDataSource };
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddCategoryAxis adds a category axis.
|
|
|
|
func (_afg Chart )AddCategoryAxis ()CategoryAxis {_fdc :=_a .NewCT_CatAx ();if _afg ._eag .Chart .PlotArea .CChoice ==nil {_afg ._eag .Chart .PlotArea .CChoice =_a .NewCT_PlotAreaChoice1 ();};_fdc .AxId =_a .NewCT_UnsignedInt ();_fdc .AxId .ValAttr =0x7FFFFFFF&_g .Uint32 ();
|
|
|
|
_afg ._eag .Chart .PlotArea .CChoice .CatAx =append (_afg ._eag .Chart .PlotArea .CChoice .CatAx ,_fdc );_fdc .Auto =_a .NewCT_Boolean ();_fdc .Auto .ValAttr =_dd .Bool (true );_fdc .Delete =_a .NewCT_Boolean ();_fdc .Delete .ValAttr =_dd .Bool (false );
|
|
|
|
_bdb :=MakeCategoryAxis (_fdc );_bdb .InitializeDefaults ();return _bdb ;};type ValueAxis struct{_dfee *_a .CT_ValAx };type DataLabels struct{_gae *_a .CT_DLbls };
|
2022-06-27 19:44:23 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddLineChart adds a new line chart to a chart.
|
|
|
|
func (_gc Chart )AddLineChart ()LineChart {_bc :=_a .NewCT_PlotAreaChoice ();_gc ._eag .Chart .PlotArea .Choice =append (_gc ._eag .Chart .PlotArea .Choice ,_bc );_bc .LineChart =_a .NewCT_LineChart ();_bc .LineChart .Grouping =_a .NewCT_Grouping ();_bc .LineChart .Grouping .ValAttr =_a .ST_GroupingStandard ;
|
|
|
|
return LineChart {_gda :_bc .LineChart };};
|
2022-09-02 11:46:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Index returns the index of the series
|
|
|
|
func (_baa LineChartSeries )Index ()uint32 {return _baa ._deg .Idx .ValAttr };func (_geba Marker )SetSize (sz uint8 ){_geba ._eab .Size =_a .NewCT_MarkerSize ();_geba ._eab .Size .ValAttr =&sz ;};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddAreaChart adds a new area chart to a chart.
|
|
|
|
func (_dac Chart )AddAreaChart ()AreaChart {_dea :=_a .NewCT_PlotAreaChoice ();_dac ._eag .Chart .PlotArea .Choice =append (_dac ._eag .Chart .PlotArea .Choice ,_dea );_dea .AreaChart =_a .NewCT_AreaChart ();_def :=AreaChart {_ed :_dea .AreaChart };_def .InitializeDefaults ();
|
|
|
|
return _def ;};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_faee SurfaceChart )X ()*_a .CT_SurfaceChart {return _faee ._fgaa };func (_dca NumberDataSource )SetReference (s string ){_dca .ensureChoice ();if _dca ._aabf .Choice .NumRef ==nil {_dca ._aabf .Choice .NumRef =_a .NewCT_NumRef ();};_dca ._aabf .Choice .NumRef .F =s ;
|
|
|
|
};func (_bgf ScatterChartSeries )InitializeDefaults (){_bgf .Properties ().LineProperties ().SetNoFill ();_bgf .Marker ().SetSymbol (_a .ST_MarkerStyleAuto );_bgf .Labels ().SetShowLegendKey (false );_bgf .Labels ().SetShowValue (true );_bgf .Labels ().SetShowPercent (false );
|
|
|
|
_bgf .Labels ().SetShowCategoryName (false );_bgf .Labels ().SetShowSeriesName (false );_bgf .Labels ().SetShowLeaderLines (false );};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_cef AreaChartSeries )Properties ()_f .ShapeProperties {if _cef ._af .SpPr ==nil {_cef ._af .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_cef ._af .SpPr );};func (_fdaf StockChart )AddAxis (axis Axis ){_cgcf :=_a .NewCT_UnsignedInt ();
|
|
|
|
_cgcf .ValAttr =axis .AxisID ();_fdaf ._gdd .AxId =append (_fdaf ._gdd .AxId ,_cgcf );};func MakeCategoryAxis (x *_a .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_fcda SurfaceChartSeries )SetOrder (idx uint32 ){_fcda ._eaf .Order .ValAttr =idx };
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Marker returns the marker properties.
|
|
|
|
func (_debc LineChartSeries )Marker ()Marker {if _debc ._deg .Marker ==nil {_debc ._deg .Marker =_a .NewCT_Marker ();};return MakeMarker (_debc ._deg .Marker );};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_gedg RadarChartSeries )Values ()NumberDataSource {if _gedg ._fcff .Val ==nil {_gedg ._fcff .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_gedg ._fcff .Val );};func (_fgfe ValueAxis )SetMajorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_fgfe ._dfee .MajorTickMark =nil ;
|
|
|
|
}else {_fgfe ._dfee .MajorTickMark =_a .NewCT_TickMark ();_fgfe ._dfee .MajorTickMark .ValAttr =m ;};};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddAxis adds an axis to a line chart.
|
|
|
|
func (_deag Line3DChart )AddAxis (axis Axis ){_dgd :=_a .NewCT_UnsignedInt ();_dgd .ValAttr =axis .AxisID ();_deag ._ffa .AxId =append (_deag ._ffa .AxId ,_dgd );};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_gaec PieChartSeries )Properties ()_f .ShapeProperties {if _gaec ._eegg .SpPr ==nil {_gaec ._eegg .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_gaec ._eegg .SpPr );};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// PieChartSeries is a series to be used on an Pie chart.
|
|
|
|
type PieChartSeries struct{_eegg *_a .CT_PieSer };func (_ede DateAxis )AxisID ()uint32 {return _ede ._dacg .AxId .ValAttr };
|
2023-04-15 17:27:31 +00:00
|
|
|
|
2024-07-28 07:48:26 +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 (_abgd NumberDataSource )CreateEmptyNumberCache (){_abgd .ensureChoice ();if _abgd ._aabf .Choice .NumRef ==nil {_abgd ._aabf .Choice .NumRef =_a .NewCT_NumRef ();};_abgd ._aabf .Choice .NumLit =nil ;_abgd ._aabf .Choice .NumRef .NumCache =_a .NewCT_NumData ();
|
|
|
|
_abgd ._aabf .Choice .NumRef .NumCache .PtCount =_a .NewCT_UnsignedInt ();_abgd ._aabf .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_cgcb ScatterChartSeries )Properties ()_f .ShapeProperties {if _cgcb ._gdg .SpPr ==nil {_cgcb ._gdg .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_cgcb ._gdg .SpPr );};
|
2020-11-09 01:00:18 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the chart's shape properties.
|
|
|
|
func (_ccg Chart )Properties ()_f .ShapeProperties {if _ccg ._eag .SpPr ==nil {_ccg ._eag .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_ccg ._eag .SpPr );};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_dag Title )X ()*_a .CT_Title {return _dag ._bfdc };
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to an Pie chart.
|
|
|
|
func (_degf PieChart )AddSeries ()PieChartSeries {_dgc :=_a .NewCT_PieSer ();_degf ._fbb .Ser =append (_degf ._fbb .Ser ,_dgc );_dgc .Idx .ValAttr =uint32 (len (_degf ._fbb .Ser )-1);_dgc .Order .ValAttr =uint32 (len (_degf ._fbb .Ser )-1);_aded :=PieChartSeries {_dgc };
|
|
|
|
_aded .InitializeDefaults ();return _aded ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_gfb BarChartSeries )Properties ()_f .ShapeProperties {if _gfb ._gfe .SpPr ==nil {_gfb ._gfe .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_gfb ._gfe .SpPr );};func (_aff CategoryAxis )Properties ()_f .ShapeProperties {if _aff ._be .SpPr ==nil {_aff ._be .SpPr =_ge .NewCT_ShapeProperties ();
|
|
|
|
};return _f .MakeShapeProperties (_aff ._be .SpPr );};func (_gfc Title )RunProperties ()_f .RunProperties {if _gfc ._bfdc .Tx ==nil {_gfc .SetText ("");};if _gfc ._bfdc .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_gfc ._bfdc .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_ge .NewCT_TextCharacterProperties ();
|
|
|
|
};return _f .MakeRunProperties (_gfc ._bfdc .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// LineChartSeries is the data series for a line chart.
|
|
|
|
type LineChartSeries struct{_deg *_a .CT_LineSer };
|
2023-05-26 09:49:04 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// RemoveTitle removes any existing title from the chart.
|
|
|
|
func (_ggef Chart )RemoveTitle (){_ggef ._eag .Chart .Title =nil ;_ggef ._eag .Chart .AutoTitleDeleted =_a .NewCT_Boolean ();_ggef ._eag .Chart .AutoTitleDeleted .ValAttr =_dd .Bool (true );};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_gaa Chart )X ()*_a .ChartSpace {return _gaa ._eag };
|
2021-03-16 20:51:18 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// SetLabelReference is used to set the source data to a range of cells
|
|
|
|
// containing strings.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_cc CategoryAxisDataSource )SetLabelReference (s string ){_cc ._da .Choice =_a .NewCT_AxDataSourceChoice ();_cc ._da .Choice .StrRef =_a .NewCT_StrRef ();_cc ._da .Choice .StrRef .F =s ;};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddLine3DChart adds a new 3D line chart to a chart.
|
|
|
|
func (_bad Chart )AddLine3DChart ()Line3DChart {_ece (_bad ._eag .Chart );_adbb :=_a .NewCT_PlotAreaChoice ();_bad ._eag .Chart .PlotArea .Choice =append (_bad ._eag .Chart .PlotArea .Choice ,_adbb );_adbb .Line3DChart =_a .NewCT_Line3DChart ();_adbb .Line3DChart .Grouping =_a .NewCT_Grouping ();
|
|
|
|
_adbb .Line3DChart .Grouping .ValAttr =_a .ST_GroupingStandard ;return Line3DChart {_ffa :_adbb .Line3DChart };};func (_bab chartBase )nextColor (_ddc int )_ga .Color {return _aea [_ddc %len (_aea )]};
|
2020-11-09 01:00:18 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetText sets the series text.
|
|
|
|
func (_gede BubbleChartSeries )SetText (s string ){_gede ._ea .Tx =_a .NewCT_SerTx ();_gede ._ea .Tx .Choice .V =&s ;};
|
2022-09-02 11:46:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetDisplayBlanksAs controls how missing values are displayed.
|
|
|
|
func (_aab Chart )SetDisplayBlanksAs (v _a .ST_DispBlanksAs ){_aab ._eag .Chart .DispBlanksAs =_a .NewCT_DispBlanksAs ();_aab ._eag .Chart .DispBlanksAs .ValAttr =v ;};
|
2024-06-20 13:33:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// BubbleChart is a 2D Bubble chart.
|
|
|
|
type BubbleChart struct{chartBase ;_dg *_a .CT_BubbleChart ;};func (_dgg DateAxis )Properties ()_f .ShapeProperties {if _dgg ._dacg .SpPr ==nil {_dgg ._dacg .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_dgg ._dacg .SpPr );};func (_fba ValueAxis )Properties ()_f .ShapeProperties {if _fba ._dfee .SpPr ==nil {_fba ._dfee .SpPr =_ge .NewCT_ShapeProperties ();
|
|
|
|
};return _f .MakeShapeProperties (_fba ._dfee .SpPr );};func (_fc CategoryAxis )SetMajorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_fc ._be .MajorTickMark =nil ;}else {_fc ._be .MajorTickMark =_a .NewCT_TickMark ();_fc ._be .MajorTickMark .ValAttr =m ;
|
|
|
|
};};
|
2022-12-06 11:56:49 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddValueAxis adds a value axis to the chart.
|
|
|
|
func (_bf Chart )AddValueAxis ()ValueAxis {_gge :=_a .NewCT_ValAx ();if _bf ._eag .Chart .PlotArea .CChoice ==nil {_bf ._eag .Chart .PlotArea .CChoice =_a .NewCT_PlotAreaChoice1 ();};_gge .AxId =_a .NewCT_UnsignedInt ();_gge .AxId .ValAttr =0x7FFFFFFF&_g .Uint32 ();
|
|
|
|
_bf ._eag .Chart .PlotArea .CChoice .ValAx =append (_bf ._eag .Chart .PlotArea .CChoice .ValAx ,_gge );_gge .Delete =_a .NewCT_Boolean ();_gge .Delete .ValAttr =_dd .Bool (false );_gge .Scaling =_a .NewCT_Scaling ();_gge .Scaling .Orientation =_a .NewCT_Orientation ();
|
|
|
|
_gge .Scaling .Orientation .ValAttr =_a .ST_OrientationMinMax ;_gge .Choice =&_a .EG_AxSharedChoice {};_gge .Choice .Crosses =_a .NewCT_Crosses ();_gge .Choice .Crosses .ValAttr =_a .ST_CrossesAutoZero ;_gge .CrossBetween =_a .NewCT_CrossBetween ();_gge .CrossBetween .ValAttr =_a .ST_CrossBetweenBetween ;
|
|
|
|
_gcf :=MakeValueAxis (_gge );_gcf .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_ga .LightGray );_gcf .SetMajorTickMark (_a .ST_TickMarkOut );_gcf .SetMinorTickMark (_a .ST_TickMarkIn );_gcf .SetTickLabelPosition (_a .ST_TickLblPosNextTo );
|
|
|
|
_gcf .Properties ().LineProperties ().SetSolidFill (_ga .Black );_gcf .SetPosition (_a .ST_AxPosL );return _gcf ;};
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddAxis adds an axis to a Surface chart.
|
|
|
|
func (_baf SurfaceChart )AddAxis (axis Axis ){_ecb :=_a .NewCT_UnsignedInt ();_ecb .ValAttr =axis .AxisID ();_baf ._fgaa .AxId =append (_baf ._fgaa .AxId ,_ecb );};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetExplosion sets the value that the segements of the pie are 'exploded' by
|
|
|
|
func (_gbf PieChartSeries )SetExplosion (v uint32 ){_gbf ._eegg .Explosion =_a .NewCT_UnsignedInt ();_gbf ._eegg .Explosion .ValAttr =v ;};func (_fb Legend )SetPosition (p _a .ST_LegendPos ){if p ==_a .ST_LegendPosUnset {_fb ._ggb .LegendPos =nil ;}else {_fb ._ggb .LegendPos =_a .NewCT_LegendPos ();
|
|
|
|
_fb ._ggb .LegendPos .ValAttr =p ;};};
|
2020-10-12 13:59:12 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_gfa Marker )X ()*_a .CT_Marker {return _gfa ._eab };
|
2024-06-20 13:33:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// StockChart is a 2D Stock chart.
|
|
|
|
type StockChart struct{chartBase ;_gdd *_a .CT_StockChart ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_eg Area3DChart )X ()*_a .CT_Area3DChart {return _eg ._c };type CategoryAxis struct{_be *_a .CT_CatAx };
|
2023-05-26 09:49:04 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_efa BarChart )X ()*_a .CT_BarChart {return _efa ._ab };func (_ecge DateAxis )MajorGridLines ()GridLines {if _ecge ._dacg .MajorGridlines ==nil {_ecge ._dacg .MajorGridlines =_a .NewCT_ChartLines ();};return GridLines {_ecge ._dacg .MajorGridlines };
|
|
|
|
};var _aea =[]_ga .Color {_ga .RGB (0x33,0x66,0xcc),_ga .RGB (0xDC,0x39,0x12),_ga .RGB (0xFF,0x99,0x00),_ga .RGB (0x10,0x96,0x18),_ga .RGB (0x99,0x00,0x99),_ga .RGB (0x3B,0x3E,0xAC),_ga .RGB (0x00,0x99,0xC6),_ga .RGB (0xDD,0x44,0x77),_ga .RGB (0x66,0xAA,0x00),_ga .RGB (0xB8,0x2E,0x2E),_ga .RGB (0x31,0x63,0x95),_ga .RGB (0x99,0x44,0x99),_ga .RGB (0x22,0xAA,0x99),_ga .RGB (0xAA,0xAA,0x11),_ga .RGB (0x66,0x33,0xCC),_ga .RGB (0xE6,0x73,0x00),_ga .RGB (0x8B,0x07,0x07),_ga .RGB (0x32,0x92,0x62),_ga .RGB (0x55,0x74,0xA6),_ga .RGB (0x3B,0x3E,0xAC)};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a line chart.
|
|
|
|
func (_afaa LineChart )AddSeries ()LineChartSeries {_bcd :=_afaa .nextColor (len (_afaa ._gda .Ser ));_fgb :=_a .NewCT_LineSer ();_afaa ._gda .Ser =append (_afaa ._gda .Ser ,_fgb );_fgb .Idx .ValAttr =uint32 (len (_afaa ._gda .Ser )-1);_fgb .Order .ValAttr =uint32 (len (_afaa ._gda .Ser )-1);
|
|
|
|
_cgdf :=LineChartSeries {_fgb };_cgdf .InitializeDefaults ();_cgdf .Properties ().LineProperties ().SetSolidFill (_bcd );return _cgdf ;};
|
2022-04-09 14:27:46 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_fgbf ScatterChartSeries )SetOrder (idx uint32 ){_fgbf ._gdg .Order .ValAttr =idx };
|
2022-04-09 14:27:46 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_aaag LineChartSeries )SetOrder (idx uint32 ){_aaag ._deg .Order .ValAttr =idx };
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the Bubble chart to its defaults
|
|
|
|
func (_cf BubbleChart )InitializeDefaults (){};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to an Pie chart.
|
|
|
|
func (_cfd PieOfPieChart )AddSeries ()PieChartSeries {_ebgc :=_a .NewCT_PieSer ();_cfd ._bgcf .Ser =append (_cfd ._bgcf .Ser ,_ebgc );_ebgc .Idx .ValAttr =uint32 (len (_cfd ._bgcf .Ser )-1);_ebgc .Order .ValAttr =uint32 (len (_cfd ._bgcf .Ser )-1);_afee :=PieChartSeries {_ebgc };
|
|
|
|
_afee .InitializeDefaults ();return _afee ;};func (_cgc RadarChart )AddAxis (axis Axis ){_gdf :=_a .NewCT_UnsignedInt ();_gdf .ValAttr =axis .AxisID ();_cgc ._dcag .AxId =append (_cgc ._dcag .AxId ,_gdf );};func (_bbg CategoryAxis )SetPosition (p _a .ST_AxPos ){_bbg ._be .AxPos =_a .NewCT_AxPos ();
|
|
|
|
_bbg ._be .AxPos .ValAttr =p ;};type SeriesAxis struct{_dgga *_a .CT_SerAx };
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// BarChartSeries is a series to be used on a bar chart.
|
|
|
|
type BarChartSeries struct{_gfe *_a .CT_BarSer };
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_defd PieOfPieChart )X ()*_a .CT_OfPieChart {return _defd ._bgcf };
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// PieOfPieChart is a Pie chart with an extra Pie chart.
|
|
|
|
type PieOfPieChart struct{chartBase ;_bgcf *_a .CT_OfPieChart ;};func (_bac ValueAxis )SetTickLabelPosition (p _a .ST_TickLblPos ){if p ==_a .ST_TickLblPosUnset {_bac ._dfee .TickLblPos =nil ;}else {_bac ._dfee .TickLblPos =_a .NewCT_TickLblPos ();_bac ._dfee .TickLblPos .ValAttr =p ;
|
|
|
|
};};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
|
|
|
|
type RadarChart struct{chartBase ;_dcag *_a .CT_RadarChart ;};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// MakeAxisDataSource constructs an AxisDataSource wrapper.
|
|
|
|
func MakeAxisDataSource (x *_a .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Order returns the order of the series
|
|
|
|
func (_gabe LineChartSeries )Order ()uint32 {return _gabe ._deg .Order .ValAttr };
|
2022-02-25 19:20:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_acgf BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _acgf ._ea .XVal ==nil {_acgf ._ea .XVal =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_acgf ._ea .XVal );};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// SetText sets the series text.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_bge RadarChartSeries )SetText (s string ){_bge ._fcff .Tx =_a .NewCT_SerTx ();_bge ._fcff .Tx .Choice .V =&s ;};type GridLines struct{_aca *_a .CT_ChartLines };func (_gee DataLabels )SetShowSeriesName (b bool ){_gee .ensureChoice ();_gee ._gae .Choice .ShowSerName =_a .NewCT_Boolean ();
|
|
|
|
_gee ._gae .Choice .ShowSerName .ValAttr =_dd .Bool (b );};func (_ddcc DataLabels )SetShowLeaderLines (b bool ){_ddcc .ensureChoice ();_ddcc ._gae .Choice .ShowLeaderLines =_a .NewCT_Boolean ();_ddcc ._gae .Choice .ShowLeaderLines .ValAttr =_dd .Bool (b );
|
|
|
|
};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the Bubble chart series shape properties.
|
|
|
|
func (_ecg BubbleChartSeries )Properties ()_f .ShapeProperties {if _ecg ._ea .SpPr ==nil {_ecg ._ea .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_ecg ._ea .SpPr );};
|
2021-03-16 20:51:18 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddRadarChart adds a new radar chart to a chart.
|
|
|
|
func (_acf Chart )AddRadarChart ()RadarChart {_egbg :=_a .NewCT_PlotAreaChoice ();_acf ._eag .Chart .PlotArea .Choice =append (_acf ._eag .Chart .PlotArea .Choice ,_egbg );_egbg .RadarChart =_a .NewCT_RadarChart ();_gagb :=RadarChart {_dcag :_egbg .RadarChart };
|
|
|
|
_gagb .InitializeDefaults ();return _gagb ;};func (_agb Marker )SetSymbol (s _a .ST_MarkerStyle ){if s ==_a .ST_MarkerStyleUnset {_agb ._eab .Symbol =nil ;}else {_agb ._eab .Symbol =_a .NewCT_MarkerStyle ();_agb ._eab .Symbol .ValAttr =s ;};};func (_gde ValueAxis )AxisID ()uint32 {return _gde ._dfee .AxId .ValAttr };
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_fgf SurfaceChartSeries )SetIndex (idx uint32 ){_fgf ._eaf .Idx .ValAttr =idx };
|
|
|
|
|
|
|
|
// BubbleChartSeries is a series to be used on a Bubble chart.
|
|
|
|
type BubbleChartSeries struct{_ea *_a .CT_BubbleSer };
|
|
|
|
|
|
|
|
// SetNumberReference is used to set the source data to a range of cells containing
|
|
|
|
// numbers.
|
|
|
|
func (_fea CategoryAxisDataSource )SetNumberReference (s string ){_fea ._da .Choice =_a .NewCT_AxDataSourceChoice ();_fea ._da .Choice .NumRef =_a .NewCT_NumRef ();_fea ._da .Choice .NumRef .F =s ;};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a line chart.
|
|
|
|
func (_dcb Line3DChart )AddSeries ()LineChartSeries {_efd :=_dcb .nextColor (len (_dcb ._ffa .Ser ));_ggf :=_a .NewCT_LineSer ();_dcb ._ffa .Ser =append (_dcb ._ffa .Ser ,_ggf );_ggf .Idx .ValAttr =uint32 (len (_dcb ._ffa .Ser )-1);_ggf .Order .ValAttr =uint32 (len (_dcb ._ffa .Ser )-1);
|
|
|
|
_fff :=LineChartSeries {_ggf };_fff .InitializeDefaults ();_fff .Properties ().LineProperties ().SetSolidFill (_efd );_fff .Properties ().SetSolidFill (_efd );return _fff ;};
|
|
|
|
|
|
|
|
// Surface3DChart is a 3D view of a surface chart.
|
|
|
|
type Surface3DChart struct{chartBase ;_edeg *_a .CT_Surface3DChart ;};func (_afbc ValueAxis )SetPosition (p _a .ST_AxPos ){_afbc ._dfee .AxPos =_a .NewCT_AxPos ();_afbc ._dfee .AxPos .ValAttr =p ;};func MakeTitle (x *_a .CT_Title )Title {return Title {x }};
|
|
|
|
func MakeChart (x *_a .ChartSpace )Chart {return Chart {x }};func (_eded Legend )InitializeDefaults (){_eded .SetPosition (_a .ST_LegendPosR );_eded .SetOverlay (false );_eded .Properties ().SetNoFill ();_eded .Properties ().LineProperties ().SetNoFill ();
|
|
|
|
};func (_agg SeriesAxis )InitializeDefaults (){};
|
2024-05-22 00:21:11 +00:00
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_ccab StockChart )X ()*_a .CT_StockChart {return _ccab ._gdd };func (_dda Chart )AddSeriesAxis ()SeriesAxis {_gea :=_a .NewCT_SerAx ();if _dda ._eag .Chart .PlotArea .CChoice ==nil {_dda ._eag .Chart .PlotArea .CChoice =_a .NewCT_PlotAreaChoice1 ();
|
|
|
|
};_gea .AxId =_a .NewCT_UnsignedInt ();_gea .AxId .ValAttr =0x7FFFFFFF&_g .Uint32 ();_dda ._eag .Chart .PlotArea .CChoice .SerAx =append (_dda ._eag .Chart .PlotArea .CChoice .SerAx ,_gea );_gea .Delete =_a .NewCT_Boolean ();_gea .Delete .ValAttr =_dd .Bool (false );
|
|
|
|
_aaae :=MakeSeriesAxis (_gea );_aaae .InitializeDefaults ();return _aaae ;};func (_ebag DateAxis )SetMinorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_ebag ._dacg .MinorTickMark =nil ;}else {_ebag ._dacg .MinorTickMark =_a .NewCT_TickMark ();
|
|
|
|
_ebag ._dacg .MinorTickMark .ValAttr =m ;};};
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// PieChart is a Pie chart.
|
|
|
|
type PieChart struct{chartBase ;_fbb *_a .CT_PieChart ;};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bag SurfaceChartSeries )X ()*_a .CT_SurfaceSer {return _bag ._eaf };
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// Index returns the index of the series
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_bed ScatterChartSeries )Index ()uint32 {return _bed ._gdg .Idx .ValAttr };
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddPie3DChart adds a new pie chart to a chart.
|
|
|
|
func (_fce Chart )AddPie3DChart ()Pie3DChart {_ece (_fce ._eag .Chart );_fae :=_a .NewCT_PlotAreaChoice ();_fce ._eag .Chart .PlotArea .Choice =append (_fce ._eag .Chart .PlotArea .Choice ,_fae );_fae .Pie3DChart =_a .NewCT_Pie3DChart ();_ag :=Pie3DChart {_ebb :_fae .Pie3DChart };
|
|
|
|
_ag .InitializeDefaults ();return _ag ;};func (_gafe ValueAxis )SetMinorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_gafe ._dfee .MinorTickMark =nil ;}else {_gafe ._dfee .MinorTickMark =_a .NewCT_TickMark ();_gafe ._dfee .MinorTickMark .ValAttr =m ;
|
|
|
|
};};func (_dc DataLabels )SetPosition (p _a .ST_DLblPos ){_dc .ensureChoice ();_dc ._gae .Choice .DLblPos =_a .NewCT_DLblPos ();_dc ._gae .Choice .DLblPos .ValAttr =p ;};
|
2024-06-20 13:33:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults initializes an Pie series to the default values.
|
|
|
|
func (_bec PieChartSeries )InitializeDefaults (){};func _ece (_fafff *_a .CT_Chart ){_fafff .View3D =_a .NewCT_View3D ();_fafff .View3D .RotX =_a .NewCT_RotX ();_fafff .View3D .RotX .ValAttr =_dd .Int8 (15);_fafff .View3D .RotY =_a .NewCT_RotY ();_fafff .View3D .RotY .ValAttr =_dd .Uint16 (20);
|
|
|
|
_fafff .View3D .RAngAx =_a .NewCT_Boolean ();_fafff .View3D .RAngAx .ValAttr =_dd .Bool (false );_fafff .Floor =_a .NewCT_Surface ();_fafff .Floor .Thickness =_a .NewCT_Thickness ();_fafff .Floor .Thickness .ValAttr .Uint32 =_dd .Uint32 (0);_fafff .SideWall =_a .NewCT_Surface ();
|
|
|
|
_fafff .SideWall .Thickness =_a .NewCT_Thickness ();_fafff .SideWall .Thickness .ValAttr .Uint32 =_dd .Uint32 (0);_fafff .BackWall =_a .NewCT_Surface ();_fafff .BackWall .Thickness =_a .NewCT_Thickness ();_fafff .BackWall .Thickness .ValAttr .Uint32 =_dd .Uint32 (0);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Values returns the value data source.
|
|
|
|
func (_dfde BubbleChartSeries )Values ()NumberDataSource {if _dfde ._ea .YVal ==nil {_dfde ._ea .YVal =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_dfde ._ea .YVal );};func (_gbe DataLabels )SetShowLegendKey (b bool ){_gbe .ensureChoice ();
|
|
|
|
_gbe ._gae .Choice .ShowLegendKey =_a .NewCT_Boolean ();_gbe ._gae .Choice .ShowLegendKey .ValAttr =_dd .Bool (b );};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_gbd GridLines )X ()*_a .CT_ChartLines {return _gbd ._aca };
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_ceg LineChartSeries )X ()*_a .CT_LineSer {return _ceg ._deg };
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_ecd DoughnutChart )InitializeDefaults (){_ecd ._abd .VaryColors =_a .NewCT_Boolean ();_ecd ._abd .VaryColors .ValAttr =_dd .Bool (true );_ecd ._abd .HoleSize =_a .NewCT_HoleSize ();_ecd ._abd .HoleSize .ValAttr =&_a .ST_HoleSize {};_ecd ._abd .HoleSize .ValAttr .ST_HoleSizeUByte =_dd .Uint8 (50);
|
|
|
|
};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_dbg AreaChartSeries )X ()*_a .CT_AreaSer {return _dbg ._af };func MakeDataLabels (x *_a .CT_DLbls )DataLabels {return DataLabels {x }};func (_ba CategoryAxis )AxisID ()uint32 {return _ba ._be .AxId .ValAttr };
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a bar chart.
|
|
|
|
func (_egb BarChart )AddSeries ()BarChartSeries {_gab :=_egb .nextColor (len (_egb ._ab .Ser ));_ecc :=_a .NewCT_BarSer ();_egb ._ab .Ser =append (_egb ._ab .Ser ,_ecc );_ecc .Idx .ValAttr =uint32 (len (_egb ._ab .Ser )-1);_ecc .Order .ValAttr =uint32 (len (_egb ._ab .Ser )-1);
|
|
|
|
_afe :=BarChartSeries {_ecc };_afe .InitializeDefaults ();_afe .Properties ().SetSolidFill (_gab );return _afe ;};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_gafc Pie3DChart )InitializeDefaults (){_gafc ._ebb .VaryColors =_a .NewCT_Boolean ();_gafc ._ebb .VaryColors .ValAttr =_dd .Bool (true );};
|
2022-02-25 19:20:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddAxis adds an axis to a Scatter chart.
|
|
|
|
func (_aag ScatterChart )AddAxis (axis Axis ){_bae :=_a .NewCT_UnsignedInt ();_bae .ValAttr =axis .AxisID ();_aag ._efb .AxId =append (_aag ._efb .AxId ,_bae );};
|
2020-08-31 22:58:25 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_gag AreaChart )X ()*_a .CT_AreaChart {return _gag ._ed };
|
2020-08-31 22:58:25 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Pie3DChart is a Pie3D chart.
|
|
|
|
type Pie3DChart struct{chartBase ;_ebb *_a .CT_Pie3DChart ;};func MakeLegend (l *_a .CT_Legend )Legend {return Legend {l }};func (_caa CategoryAxis )SetCrosses (axis Axis ){_caa ._be .Choice =_a .NewEG_AxSharedChoice ();_caa ._be .Choice .Crosses =_a .NewCT_Crosses ();
|
|
|
|
_caa ._be .Choice .Crosses .ValAttr =_a .ST_CrossesAutoZero ;_caa ._be .CrossAx .ValAttr =axis .AxisID ();};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a Surface chart.
|
|
|
|
func (_ggfd Surface3DChart )AddSeries ()SurfaceChartSeries {_agbe :=_ggfd .nextColor (len (_ggfd ._edeg .Ser ));_dbf :=_a .NewCT_SurfaceSer ();_ggfd ._edeg .Ser =append (_ggfd ._edeg .Ser ,_dbf );_dbf .Idx .ValAttr =uint32 (len (_ggfd ._edeg .Ser )-1);
|
|
|
|
_dbf .Order .ValAttr =uint32 (len (_ggfd ._edeg .Ser )-1);_gege :=SurfaceChartSeries {_dbf };_gege .InitializeDefaults ();_gege .Properties ().LineProperties ().SetSolidFill (_agbe );return _gege ;};func (_cee nullAxis )AxisID ()uint32 {return 0};func (_gaf CategoryAxis )SetMinorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_gaf ._be .MinorTickMark =nil ;
|
|
|
|
}else {_gaf ._be .MinorTickMark =_a .NewCT_TickMark ();_gaf ._be .MinorTickMark .ValAttr =m ;};};func MakeSeriesAxis (x *_a .CT_SerAx )SeriesAxis {return SeriesAxis {x }};
|
2020-12-17 22:07:08 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AreaChart is an area chart that has a shaded area underneath a curve.
|
|
|
|
type AreaChart struct{chartBase ;_ed *_a .CT_AreaChart ;};func (_faa LineChartSeries )SetSmooth (b bool ){_faa ._deg .Smooth =_a .NewCT_Boolean ();_faa ._deg .Smooth .ValAttr =&b ;};
|
2020-12-17 22:07:08 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// BarChart is a 2D bar chart.
|
|
|
|
type BarChart struct{chartBase ;_ab *_a .CT_BarChart ;};
|
2021-01-04 16:11:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults initializes an Radar series to the default values.
|
|
|
|
func (_edec RadarChartSeries )InitializeDefaults (){};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bde RadarChart )X ()*_a .CT_RadarChart {return _bde ._dcag };
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// DoughnutChart is a Doughnut chart.
|
|
|
|
type DoughnutChart struct{chartBase ;_abd *_a .CT_DoughnutChart ;};func MakeMarker (x *_a .CT_Marker )Marker {return Marker {x }};func (_cdb SurfaceChartSeries )InitializeDefaults (){_cdb .Properties ().LineProperties ().SetWidth (1*_d .Point );_cdb .Properties ().LineProperties ().SetSolidFill (_ga .Black );
|
|
|
|
_cdb .Properties ().LineProperties ().SetJoin (_f .LineJoinRound );};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Axis is the interface implemented by different axes when assigning to a
|
|
|
|
// chart.
|
|
|
|
type Axis interface{AxisID ()uint32 ;};
|
2023-04-15 17:27:31 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSurfaceChart adds a new surface chart to a chart.
|
|
|
|
func (_dfe Chart )AddSurfaceChart ()SurfaceChart {_fg :=_a .NewCT_PlotAreaChoice ();_dfe ._eag .Chart .PlotArea .Choice =append (_dfe ._eag .Chart .PlotArea .Choice ,_fg );_fg .SurfaceChart =_a .NewCT_SurfaceChart ();_ece (_dfe ._eag .Chart );_dfe ._eag .Chart .View3D .RotX .ValAttr =_dd .Int8 (90);
|
|
|
|
_dfe ._eag .Chart .View3D .RotY .ValAttr =_dd .Uint16 (0);_dfe ._eag .Chart .View3D .Perspective =_a .NewCT_Perspective ();_dfe ._eag .Chart .View3D .Perspective .ValAttr =_dd .Uint8 (0);_gb :=SurfaceChart {_fgaa :_fg .SurfaceChart };_gb .InitializeDefaults ();
|
|
|
|
return _gb ;};
|
2024-06-20 13:33:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a Surface chart.
|
|
|
|
func (_cgdg SurfaceChart )AddSeries ()SurfaceChartSeries {_feca :=_cgdg .nextColor (len (_cgdg ._fgaa .Ser ));_abb :=_a .NewCT_SurfaceSer ();_cgdg ._fgaa .Ser =append (_cgdg ._fgaa .Ser ,_abb );_abb .Idx .ValAttr =uint32 (len (_cgdg ._fgaa .Ser )-1);_abb .Order .ValAttr =uint32 (len (_cgdg ._fgaa .Ser )-1);
|
|
|
|
_edecc :=SurfaceChartSeries {_abb };_edecc .InitializeDefaults ();_edecc .Properties ().LineProperties ().SetSolidFill (_feca );return _edecc ;};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Index returns the index of the series
|
|
|
|
func (_fad SurfaceChartSeries )Index ()uint32 {return _fad ._eaf .Idx .ValAttr };type ScatterChart struct{chartBase ;_efb *_a .CT_ScatterChart ;};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetType sets the type the secone pie to either pie or bar
|
|
|
|
func (_bdbd PieOfPieChart )SetType (t _a .ST_OfPieType ){_bdbd ._bgcf .OfPieType .ValAttr =t };func (_ced SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ced ._eaf .Cat ==nil {_ced ._eaf .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_ced ._eaf .Cat );
|
2024-06-20 13:33:45 +00:00
|
|
|
};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SurfaceChart is a 3D surface chart, viewed from the top-down.
|
|
|
|
type SurfaceChart struct{chartBase ;_fgaa *_a .CT_SurfaceChart ;};type nullAxis byte ;func (_dgaa SeriesAxis )AxisID ()uint32 {return _dgaa ._dgga .AxId .ValAttr };func (_gcc SurfaceChartSeries )Values ()NumberDataSource {if _gcc ._eaf .Val ==nil {_gcc ._eaf .Val =_a .NewCT_NumDataSource ();
|
|
|
|
};_adc :=MakeNumberDataSource (_gcc ._eaf .Val );_adc .CreateEmptyNumberCache ();return _adc ;};
|
2021-05-31 16:22:30 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Labels returns the data label properties.
|
|
|
|
func (_dfdd ScatterChartSeries )Labels ()DataLabels {if _dfdd ._gdg .DLbls ==nil {_dfdd ._gdg .DLbls =_a .NewCT_DLbls ();};return MakeDataLabels (_dfdd ._gdg .DLbls );};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_eac SeriesAxis )X ()*_a .CT_SerAx {return _eac ._dgga };
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddPieChart adds a new pie chart to a chart.
|
|
|
|
func (_cff Chart )AddPieChart ()PieChart {_efcd :=_a .NewCT_PlotAreaChoice ();_cff ._eag .Chart .PlotArea .Choice =append (_cff ._eag .Chart .PlotArea .Choice ,_efcd );_efcd .PieChart =_a .NewCT_PieChart ();_dbb :=PieChart {_fbb :_efcd .PieChart };_dbb .InitializeDefaults ();
|
|
|
|
return _dbb ;};type Title struct{_bfdc *_a .CT_Title };func (_b Area3DChart )AddAxis (axis Axis ){_df :=_a .NewCT_UnsignedInt ();_df .ValAttr =axis .AxisID ();_b ._c .AxId =append (_b ._c .AxId ,_df );};func (_abg CategoryAxis )InitializeDefaults (){_abg .SetPosition (_a .ST_AxPosB );
|
|
|
|
_abg .SetMajorTickMark (_a .ST_TickMarkOut );_abg .SetMinorTickMark (_a .ST_TickMarkIn );_abg .SetTickLabelPosition (_a .ST_TickLblPosNextTo );_abg .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_ga .LightGray );_abg .Properties ().LineProperties ().SetSolidFill (_ga .Black );
|
|
|
|
};func (_bbge LineChartSeries )InitializeDefaults (){_bbge .Properties ().LineProperties ().SetWidth (1*_d .Point );_bbge .Properties ().LineProperties ().SetSolidFill (_ga .Black );_bbge .Properties ().LineProperties ().SetJoin (_f .LineJoinRound );_bbge .Marker ().SetSymbol (_a .ST_MarkerStyleNone );
|
|
|
|
_bbge .Labels ().SetShowLegendKey (false );_bbge .Labels ().SetShowValue (false );_bbge .Labels ().SetShowPercent (false );_bbge .Labels ().SetShowCategoryName (false );_bbge .Labels ().SetShowSeriesName (false );_bbge .Labels ().SetShowLeaderLines (false );
|
|
|
|
};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to an Doughnut chart.
|
|
|
|
func (_bcf DoughnutChart )AddSeries ()PieChartSeries {_dff :=_a .NewCT_PieSer ();_bcf ._abd .Ser =append (_bcf ._abd .Ser ,_dff );_dff .Idx .ValAttr =uint32 (len (_bcf ._abd .Ser )-1);_dff .Order .ValAttr =uint32 (len (_bcf ._abd .Ser )-1);_eceg :=PieChartSeries {_dff };
|
|
|
|
_eceg .InitializeDefaults ();return _eceg ;};
|
2024-06-20 13:33:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults initializes a bar chart series to the default values.
|
|
|
|
func (_caf BarChartSeries )InitializeDefaults (){};func (_acc BarChart )AddAxis (axis Axis ){_cd :=_a .NewCT_UnsignedInt ();_cd .ValAttr =axis .AxisID ();_acc ._ab .AxId =append (_acc ._ab .AxId ,_cd );};
|
2021-05-31 16:22:30 +00:00
|
|
|
|
2024-05-04 18:48:06 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_de BarChartSeries )X ()*_a .CT_BarSer {return _de ._gfe };
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_bd BarChart )InitializeDefaults (){_bd .SetDirection (_a .ST_BarDirCol )};
|
2021-11-10 11:45:21 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_ged BarChartSeries )Values ()NumberDataSource {if _ged ._gfe .Val ==nil {_ged ._gfe .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_ged ._gfe .Val );};func (_dcf DateAxis )SetMajorTickMark (m _a .ST_TickMark ){if m ==_a .ST_TickMarkUnset {_dcf ._dacg .MajorTickMark =nil ;
|
|
|
|
}else {_dcf ._dacg .MajorTickMark =_a .NewCT_TickMark ();_dcf ._dacg .MajorTickMark .ValAttr =m ;};};
|
2021-11-10 11:45:21 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_cae LineChartSeries )Properties ()_f .ShapeProperties {if _cae ._deg .SpPr ==nil {_cae ._deg .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_cae ._deg .SpPr );};func (_ggg DateAxis )SetCrosses (axis Axis ){_ggg ._dacg .CrossAx .ValAttr =axis .AxisID ()};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetText sets the series text.
|
|
|
|
func (_aaf AreaChartSeries )SetText (s string ){_aaf ._af .Tx =_a .NewCT_SerTx ();_aaf ._af .Tx .Choice .V =&s ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddArea3DChart adds a new area chart to a chart.
|
|
|
|
func (_afd Chart )AddArea3DChart ()Area3DChart {_ece (_afd ._eag .Chart );_gff :=_a .NewCT_PlotAreaChoice ();_afd ._eag .Chart .PlotArea .Choice =append (_afd ._eag .Chart .PlotArea .Choice ,_gff );_gff .Area3DChart =_a .NewCT_Area3DChart ();_adf :=Area3DChart {_c :_gff .Area3DChart };
|
|
|
|
_adf .InitializeDefaults ();return _adf ;};func (_abc ScatterChartSeries )SetSmooth (b bool ){_abc ._gdg .Smooth =_a .NewCT_Boolean ();_abc ._gdg .Smooth .ValAttr =&b ;};func (_dec CategoryAxis )SetTickLabelPosition (p _a .ST_TickLblPos ){if p ==_a .ST_TickLblPosUnset {_dec ._be .TickLblPos =nil ;
|
|
|
|
}else {_dec ._be .TickLblPos =_a .NewCT_TickLblPos ();_dec ._be .TickLblPos .ValAttr =p ;};};func (_ddag SeriesAxis )SetCrosses (axis Axis ){_ddag ._dgga .CrossAx .ValAttr =axis .AxisID ()};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddBar3DChart adds a new 3D bar chart to a chart.
|
|
|
|
func (_dfag Chart )AddBar3DChart ()Bar3DChart {_ece (_dfag ._eag .Chart );_fda :=_a .NewCT_PlotAreaChoice ();_dfag ._eag .Chart .PlotArea .Choice =append (_dfag ._eag .Chart .PlotArea .Choice ,_fda );_fda .Bar3DChart =_a .NewCT_Bar3DChart ();_fda .Bar3DChart .Grouping =_a .NewCT_BarGrouping ();
|
|
|
|
_fda .Bar3DChart .Grouping .ValAttr =_a .ST_BarGroupingStandard ;_bgc :=Bar3DChart {_bb :_fda .Bar3DChart };_bgc .InitializeDefaults ();return _bgc ;};
|
2021-11-10 11:45:21 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetValues sets values directly on a source.
|
|
|
|
func (_ddd NumberDataSource )SetValues (v []float64 ){_ddd .ensureChoice ();_ddd ._aabf .Choice .NumRef =nil ;_ddd ._aabf .Choice .NumLit =_a .NewCT_NumData ();_ddd ._aabf .Choice .NumLit .PtCount =_a .NewCT_UnsignedInt ();_ddd ._aabf .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));
|
|
|
|
for _dcc ,_fcd :=range v {_ddd ._aabf .Choice .NumLit .Pt =append (_ddd ._aabf .Choice .NumLit .Pt ,&_a .CT_NumVal {IdxAttr :uint32 (_dcc ),V :_ec .Sprintf ("\u0025\u0067",_fcd )});};};func (_gd Legend )SetOverlay (b bool ){_gd ._ggb .Overlay =_a .NewCT_Boolean ();
|
|
|
|
_gd ._ggb .Overlay .ValAttr =_dd .Bool (b );};
|
2021-01-04 16:11:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AreaChartSeries is a series to be used on an area chart.
|
|
|
|
type AreaChartSeries struct{_af *_a .CT_AreaSer };
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
|
|
|
|
func (_bgg DoughnutChart )SetHoleSize (pct uint8 ){if _bgg ._abd .HoleSize ==nil {_bgg ._abd .HoleSize =_a .NewCT_HoleSize ();};if _bgg ._abd .HoleSize .ValAttr ==nil {_bgg ._abd .HoleSize .ValAttr =&_a .ST_HoleSize {};};_bgg ._abd .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;
|
|
|
|
};func (_gebag Title )ParagraphProperties ()_f .ParagraphProperties {if _gebag ._bfdc .Tx ==nil {_gebag .SetText ("");};if _gebag ._bfdc .Tx .Choice .Rich .P [0].PPr ==nil {_gebag ._bfdc .Tx .Choice .Rich .P [0].PPr =_ge .NewCT_TextParagraphProperties ();
|
|
|
|
};return _f .MakeParagraphProperties (_gebag ._bfdc .Tx .Choice .Rich .P [0].PPr );};type chartBase struct{};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_daf Pie3DChart )X ()*_a .CT_Pie3DChart {return _daf ._ebb };
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_cgcg SurfaceChartSeries )Properties ()_f .ShapeProperties {if _cgcg ._eaf .SpPr ==nil {_cgcg ._eaf .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_cgcg ._eaf .SpPr );};func (_edg DataLabels )SetShowPercent (b bool ){_edg .ensureChoice ();
|
|
|
|
_edg ._gae .Choice .ShowPercent =_a .NewCT_Boolean ();_edg ._gae .Choice .ShowPercent .ValAttr =_dd .Bool (b );};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_bbbf PieChart )InitializeDefaults (){_bbbf ._fbb .VaryColors =_a .NewCT_Boolean ();_bbbf ._fbb .VaryColors .ValAttr =_dd .Bool (true );};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_acff PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _acff ._eegg .Cat ==nil {_acff ._eegg .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_acff ._eegg .Cat );};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_bg AreaChartSeries )Values ()NumberDataSource {if _bg ._af .Val ==nil {_bg ._af .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_bg ._af .Val );};
|
2024-06-20 13:33:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_deaf RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _deaf ._fcff .Cat ==nil {_deaf ._fcff .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_deaf ._fcff .Cat );};func (_cafc Title )SetText (s string ){if _cafc ._bfdc .Tx ==nil {_cafc ._bfdc .Tx =_a .NewCT_Tx ();
|
|
|
|
};if _cafc ._bfdc .Tx .Choice .Rich ==nil {_cafc ._bfdc .Tx .Choice .Rich =_ge .NewCT_TextBody ();};var _egbcd *_ge .CT_TextParagraph ;if len (_cafc ._bfdc .Tx .Choice .Rich .P )==0{_egbcd =_ge .NewCT_TextParagraph ();_cafc ._bfdc .Tx .Choice .Rich .P =[]*_ge .CT_TextParagraph {_egbcd };
|
|
|
|
}else {_egbcd =_cafc ._bfdc .Tx .Choice .Rich .P [0];};var _aba *_ge .EG_TextRun ;if len (_egbcd .EG_TextRun )==0{_aba =_ge .NewEG_TextRun ();_egbcd .EG_TextRun =[]*_ge .EG_TextRun {_aba };}else {_aba =_egbcd .EG_TextRun [0];};if _aba .R ==nil {_aba .R =_ge .NewCT_RegularTextRun ();
|
|
|
|
};_aba .R .T =s ;};func (_cbc DataLabels )SetShowValue (b bool ){_cbc .ensureChoice ();_cbc ._gae .Choice .ShowVal =_a .NewCT_Boolean ();_cbc ._gae .Choice .ShowVal .ValAttr =_dd .Bool (b );};
|
2021-01-04 16:11:39 +00:00
|
|
|
|
2024-05-04 18:48:06 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_fcf DateAxis )X ()*_a .CT_DateAx {return _fcf ._dacg };
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_cg AreaChart )InitializeDefaults (){};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddTitle sets a new title on the chart.
|
|
|
|
func (_acd Chart )AddTitle ()Title {_acd ._eag .Chart .Title =_a .NewCT_Title ();_acd ._eag .Chart .Title .Overlay =_a .NewCT_Boolean ();_acd ._eag .Chart .Title .Overlay .ValAttr =_dd .Bool (false );_acd ._eag .Chart .AutoTitleDeleted =_a .NewCT_Boolean ();
|
|
|
|
_acd ._eag .Chart .AutoTitleDeleted .ValAttr =_dd .Bool (false );_edbe :=MakeTitle (_acd ._eag .Chart .Title );_edbe .InitializeDefaults ();return _edbe ;};
|
2021-04-23 20:00:00 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddDateAxis adds a value axis to the chart.
|
|
|
|
func (_feb Chart )AddDateAxis ()DateAxis {_fdg :=_a .NewCT_DateAx ();if _feb ._eag .Chart .PlotArea .CChoice ==nil {_feb ._eag .Chart .PlotArea .CChoice =_a .NewCT_PlotAreaChoice1 ();};_fdg .AxId =_a .NewCT_UnsignedInt ();_fdg .AxId .ValAttr =0x7FFFFFFF&_g .Uint32 ();
|
|
|
|
_feb ._eag .Chart .PlotArea .CChoice .DateAx =append (_feb ._eag .Chart .PlotArea .CChoice .DateAx ,_fdg );_fdg .Delete =_a .NewCT_Boolean ();_fdg .Delete .ValAttr =_dd .Bool (false );_fdg .Scaling =_a .NewCT_Scaling ();_fdg .Scaling .Orientation =_a .NewCT_Orientation ();
|
|
|
|
_fdg .Scaling .Orientation .ValAttr =_a .ST_OrientationMinMax ;_fdg .Choice =&_a .EG_AxSharedChoice {};_fdg .Choice .Crosses =_a .NewCT_Crosses ();_fdg .Choice .Crosses .ValAttr =_a .ST_CrossesAutoZero ;_cgd :=DateAxis {_fdg };_cgd .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_ga .LightGray );
|
|
|
|
_cgd .SetMajorTickMark (_a .ST_TickMarkOut );_cgd .SetMinorTickMark (_a .ST_TickMarkIn );_cgd .SetTickLabelPosition (_a .ST_TickLblPosNextTo );_cgd .Properties ().LineProperties ().SetSolidFill (_ga .Black );_cgd .SetPosition (_a .ST_AxPosL );return _cgd ;
|
|
|
|
};
|
2021-07-30 17:03:26 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_abf Legend )X ()*_a .CT_Legend {return _abf ._ggb };func (_fa AreaChart )AddAxis (axis Axis ){_faf :=_a .NewCT_UnsignedInt ();_faf .ValAttr =axis .AxisID ();_fa ._ed .AxId =append (_fa ._ed .AxId ,_faf );};
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to an area chart.
|
|
|
|
func (_ff Area3DChart )AddSeries ()AreaChartSeries {_ee :=_ff .nextColor (len (_ff ._c .Ser ));_fd :=_a .NewCT_AreaSer ();_ff ._c .Ser =append (_ff ._c .Ser ,_fd );_fd .Idx .ValAttr =uint32 (len (_ff ._c .Ser )-1);_fd .Order .ValAttr =uint32 (len (_ff ._c .Ser )-1);
|
|
|
|
_ef :=AreaChartSeries {_fd };_ef .InitializeDefaults ();_ef .Properties ().SetSolidFill (_ee );return _ef ;};
|
2022-01-15 21:17:38 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bdbf ScatterChartSeries )X ()*_a .CT_ScatterSer {return _bdbf ._gdg };var NullAxis Axis =nullAxis (0);func (_eec DataLabels )SetShowCategoryName (b bool ){_eec .ensureChoice ();_eec ._gae .Choice .ShowCatName =_a .NewCT_Boolean ();_eec ._gae .Choice .ShowCatName .ValAttr =_dd .Bool (b );
|
|
|
|
};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_eeca Line3DChart )X ()*_a .CT_Line3DChart {return _eeca ._ffa };
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to an Pie3D chart.
|
|
|
|
func (_eca Pie3DChart )AddSeries ()PieChartSeries {_dbd :=_a .NewCT_PieSer ();_eca ._ebb .Ser =append (_eca ._ebb .Ser ,_dbd );_dbd .Idx .ValAttr =uint32 (len (_eca ._ebb .Ser )-1);_dbd .Order .ValAttr =uint32 (len (_eca ._ebb .Ser )-1);_fcg :=PieChartSeries {_dbd };
|
|
|
|
_fcg .InitializeDefaults ();return _fcg ;};
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bgcb Surface3DChart )X ()*_a .CT_Surface3DChart {return _bgcb ._edeg };func (_add NumberDataSource )ensureChoice (){if _add ._aabf .Choice ==nil {_add ._aabf .Choice =_a .NewCT_NumDataSourceChoice ();};};type Marker struct{_eab *_a .CT_Marker };
|
|
|
|
func (_addb ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _addb ._gdg .XVal ==nil {_addb ._gdg .XVal =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_addb ._gdg .XVal );};func (_dgb DateAxis )SetPosition (p _a .ST_AxPos ){_dgb ._dacg .AxPos =_a .NewCT_AxPos ();
|
|
|
|
_dgb ._dacg .AxPos .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.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_ebe LineChart )X ()*_a .CT_LineChart {return _ebe ._gda };func MakeValueAxis (x *_a .CT_ValAx )ValueAxis {return ValueAxis {x }};func (_ggbf Marker )Properties ()_f .ShapeProperties {if _ggbf ._eab .SpPr ==nil {_ggbf ._eab .SpPr =_ge .NewCT_ShapeProperties ();
|
|
|
|
};return _f .MakeShapeProperties (_ggbf ._eab .SpPr );};func (_gec ValueAxis )SetCrosses (axis Axis ){_gec ._dfee .CrossAx .ValAttr =axis .AxisID ()};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-06-20 13:33:45 +00:00
|
|
|
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_gbb Chart )AddDoughnutChart ()DoughnutChart {_cca :=_a .NewCT_PlotAreaChoice ();_gbb ._eag .Chart .PlotArea .Choice =append (_gbb ._eag .Chart .PlotArea .Choice ,_cca );_cca .DoughnutChart =_a .NewCT_DoughnutChart ();_aeg :=DoughnutChart {_abd :_cca .DoughnutChart };
|
|
|
|
_aeg .InitializeDefaults ();return _aeg ;};func (_ddca LineChartSeries )Values ()NumberDataSource {if _ddca ._deg .Val ==nil {_ddca ._deg .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_ddca ._deg .Val );};
|
2022-12-06 11:56:49 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetText sets the series text.
|
|
|
|
func (_edb BarChartSeries )SetText (s string ){_edb ._gfe .Tx =_a .NewCT_SerTx ();_edb ._gfe .Tx .Choice .V =&s ;};func (_ffb ScatterChartSeries )Values ()NumberDataSource {if _ffb ._gdg .YVal ==nil {_ffb ._gdg .YVal =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_ffb ._gdg .YVal );
|
2024-06-20 13:33:45 +00:00
|
|
|
};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSurface3DChart adds a new 3D surface chart to a chart.
|
|
|
|
func (_gg Chart )AddSurface3DChart ()Surface3DChart {_affd :=_a .NewCT_PlotAreaChoice ();_gg ._eag .Chart .PlotArea .Choice =append (_gg ._eag .Chart .PlotArea .Choice ,_affd );_affd .Surface3DChart =_a .NewCT_Surface3DChart ();_ece (_gg ._eag .Chart );
|
|
|
|
_fge :=Surface3DChart {_edeg :_affd .Surface3DChart };_fge .InitializeDefaults ();return _fge ;};
|
2023-03-01 18:42:44 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetDirection changes the direction of the bar chart (bar or column).
|
|
|
|
func (_ae BarChart )SetDirection (d _a .ST_BarDir ){_ae ._ab .BarDir .ValAttr =d };
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a Bubble chart.
|
|
|
|
func (_cbb BubbleChart )AddSeries ()BubbleChartSeries {_fec :=_cbb .nextColor (len (_cbb ._dg .Ser ));_cgf :=_a .NewCT_BubbleSer ();_cbb ._dg .Ser =append (_cbb ._dg .Ser ,_cgf );_cgf .Idx .ValAttr =uint32 (len (_cbb ._dg .Ser )-1);_cgf .Order .ValAttr =uint32 (len (_cbb ._dg .Ser )-1);
|
|
|
|
_acg :=BubbleChartSeries {_cgf };_acg .InitializeDefaults ();_acg .Properties ().SetSolidFill (_fec );return _acg ;};func (_bbb Bar3DChart )AddAxis (axis Axis ){_ad :=_a .NewCT_UnsignedInt ();_ad .ValAttr =axis .AxisID ();_bbb ._bb .AxId =append (_bbb ._bb .AxId ,_ad );
|
|
|
|
};func (_ebee SurfaceChart )InitializeDefaults (){_ebee ._fgaa .Wireframe =_a .NewCT_Boolean ();_ebee ._fgaa .Wireframe .ValAttr =_dd .Bool (false );_ebee ._fgaa .BandFmts =_a .NewCT_BandFmts ();for _ffe :=0;_ffe < 15;_ffe ++{_eef :=_a .NewCT_BandFmt ();
|
|
|
|
_eef .Idx .ValAttr =uint32 (_ffe );_eef .SpPr =_ge .NewCT_ShapeProperties ();_afb :=_f .MakeShapeProperties (_eef .SpPr );_afb .SetSolidFill (_ebee .nextColor (_ffe ));_ebee ._fgaa .BandFmts .BandFmt =append (_ebee ._fgaa .BandFmts .BandFmt ,_eef );};};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_fgd RadarChart )InitializeDefaults (){_fgd ._dcag .RadarStyle .ValAttr =_a .ST_RadarStyleMarker };type LineChart struct{chartBase ;_gda *_a .CT_LineChart ;};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to an area chart.
|
|
|
|
func (_ca AreaChart )AddSeries ()AreaChartSeries {_eeg :=_ca .nextColor (len (_ca ._ed .Ser ));_aa :=_a .NewCT_AreaSer ();_ca ._ed .Ser =append (_ca ._ed .Ser ,_aa );_aa .Idx .ValAttr =uint32 (len (_ca ._ed .Ser )-1);_aa .Order .ValAttr =uint32 (len (_ca ._ed .Ser )-1);
|
|
|
|
_db :=AreaChartSeries {_aa };_db .InitializeDefaults ();_db .Properties ().SetSolidFill (_eeg );return _db ;};
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddPieOfPieChart adds a new pie chart to a chart.
|
|
|
|
func (_gbc Chart )AddPieOfPieChart ()PieOfPieChart {_deb :=_a .NewCT_PlotAreaChoice ();_gbc ._eag .Chart .PlotArea .Choice =append (_gbc ._eag .Chart .PlotArea .Choice ,_deb );_deb .OfPieChart =_a .NewCT_OfPieChart ();_bbba :=PieOfPieChart {_bgcf :_deb .OfPieChart };
|
|
|
|
_bbba .InitializeDefaults ();return _bbba ;};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_fcef ValueAxis )X ()*_a .CT_ValAx {return _fcef ._dfee };
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_eb BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _eb ._gfe .Cat ==nil {_eb ._gfe .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_eb ._gfe .Cat );};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Bar3DChart is a 3D bar chart.
|
|
|
|
type Bar3DChart struct{chartBase ;_bb *_a .CT_Bar3DChart ;};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_egc PieChartSeries )Values ()NumberDataSource {if _egc ._eegg .Val ==nil {_egc ._eegg .Val =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_egc ._eegg .Val );};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetDirection changes the direction of the bar chart (bar or column).
|
|
|
|
func (_gf Bar3DChart )SetDirection (d _a .ST_BarDir ){_gf ._bb .BarDir .ValAttr =d };func MakeNumberDataSource (x *_a .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddBubbleChart adds a new bubble chart.
|
|
|
|
func (_gbce Chart )AddBubbleChart ()BubbleChart {_fcb :=_a .NewCT_PlotAreaChoice ();_gbce ._eag .Chart .PlotArea .Choice =append (_gbce ._eag .Chart .PlotArea .Choice ,_fcb );_fcb .BubbleChart =_a .NewCT_BubbleChart ();_ade :=BubbleChart {_dg :_fcb .BubbleChart };
|
|
|
|
_ade .InitializeDefaults ();return _ade ;};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-07-28 07:48:26 +00:00
|
|
|
func (_gcb DoughnutChart )X ()*_a .CT_DoughnutChart {return _gcb ._abd };
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddStockChart adds a new stock chart.
|
|
|
|
func (_gebc Chart )AddStockChart ()StockChart {_edc :=_a .NewCT_PlotAreaChoice ();_gebc ._eag .Chart .PlotArea .Choice =append (_gebc ._eag .Chart .PlotArea .Choice ,_edc );_edc .StockChart =_a .NewCT_StockChart ();_dfa :=StockChart {_gdd :_edc .StockChart };
|
|
|
|
_dfa .InitializeDefaults ();return _dfa ;};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to an Radar chart.
|
|
|
|
func (_gbg RadarChart )AddSeries ()RadarChartSeries {_geg :=_gbg .nextColor (len (_gbg ._dcag .Ser ));_cbe :=_a .NewCT_RadarSer ();_gbg ._dcag .Ser =append (_gbg ._dcag .Ser ,_cbe );_cbe .Idx .ValAttr =uint32 (len (_gbg ._dcag .Ser )-1);_cbe .Order .ValAttr =uint32 (len (_gbg ._dcag .Ser )-1);
|
|
|
|
_fag :=RadarChartSeries {_cbe };_fag .InitializeDefaults ();_fag .Properties ().SetSolidFill (_geg );return _fag ;};func (_bcc ValueAxis )MajorGridLines ()GridLines {if _bcc ._dfee .MajorGridlines ==nil {_bcc ._dfee .MajorGridlines =_a .NewCT_ChartLines ();
|
|
|
|
};return GridLines {_bcc ._dfee .MajorGridlines };};
|
2024-06-20 13:33:45 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// ScatterChartSeries is the data series for a scatter chart.
|
|
|
|
type ScatterChartSeries struct{_gdg *_a .CT_ScatterSer };
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetText sets the series text
|
|
|
|
func (_ded SurfaceChartSeries )SetText (s string ){_ded ._eaf .Tx =_a .NewCT_SerTx ();_ded ._eaf .Tx .Choice .V =&s ;};
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// SetText sets the series text
|
|
|
|
func (_bfe ScatterChartSeries )SetText (s string ){_bfe ._gdg .Tx =_a .NewCT_SerTx ();_bfe ._gdg .Tx .Choice .V =&s ;};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults initializes an area series to the default values.
|
|
|
|
func (_ceb AreaChartSeries )InitializeDefaults (){};func (_bee LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bee ._deg .Cat ==nil {_bee ._deg .Cat =_a .NewCT_AxDataSource ();};return MakeAxisDataSource (_bee ._deg .Cat );};type NumberDataSource struct{_aabf *_a .CT_NumDataSource };
|
|
|
|
func (_dba CategoryAxis )MajorGridLines ()GridLines {if _dba ._be .MajorGridlines ==nil {_dba ._be .MajorGridlines =_a .NewCT_ChartLines ();};return GridLines {_dba ._be .MajorGridlines };};
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// Values returns the bubble size data source.
|
|
|
|
func (_faff BubbleChartSeries )BubbleSizes ()NumberDataSource {if _faff ._ea .BubbleSize ==nil {_faff ._ea .BubbleSize =_a .NewCT_NumDataSource ();};return MakeNumberDataSource (_faff ._ea .BubbleSize );};
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_ce Area3DChart )InitializeDefaults (){};func (_ebf GridLines )Properties ()_f .ShapeProperties {if _ebf ._aca .SpPr ==nil {_ebf ._aca .SpPr =_ge .NewCT_ShapeProperties ();};return _f .MakeShapeProperties (_ebf ._aca .SpPr );};
|
2024-05-22 00:21:11 +00:00
|
|
|
|
2024-07-28 07:48:26 +00:00
|
|
|
// AddSeries adds a default series to a Stock chart.
|
|
|
|
func (_fagf StockChart )AddSeries ()LineChartSeries {_adeb :=_a .NewCT_LineSer ();_fagf ._gdd .Ser =append (_fagf ._gdd .Ser ,_adeb );_adeb .Idx .ValAttr =uint32 (len (_fagf ._gdd .Ser )-1);_adeb .Order .ValAttr =uint32 (len (_fagf ._gdd .Ser )-1);_gdaf :=LineChartSeries {_adeb };
|
|
|
|
_gdaf .Values ().CreateEmptyNumberCache ();_gdaf .Properties ().LineProperties ().SetNoFill ();return _gdaf ;};
|