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-05-22 00:21:11 +00:00
|
|
|
package chart ;import (_e "fmt";_f "github.com/unidoc/unioffice";_c "github.com/unidoc/unioffice/color";_a "github.com/unidoc/unioffice/drawing";_bc "github.com/unidoc/unioffice/measurement";_de "github.com/unidoc/unioffice/schema/soo/dml";_b "github.com/unidoc/unioffice/schema/soo/dml/chart";
|
|
|
|
_d "math/rand";);
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to a bar chart.
|
|
|
|
func (_dbe Bar3DChart )AddSeries ()BarChartSeries {_dfe :=_dbe .nextColor (len (_dbe ._ec .Ser ));_cg :=_b .NewCT_BarSer ();_dbe ._ec .Ser =append (_dbe ._ec .Ser ,_cg );_cg .Idx .ValAttr =uint32 (len (_dbe ._ec .Ser )-1);_cg .Order .ValAttr =uint32 (len (_dbe ._ec .Ser )-1);
|
|
|
|
_aee :=BarChartSeries {_cg };_aee .InitializeDefaults ();_aee .Properties ().SetSolidFill (_dfe );return _aee ;};
|
2021-03-16 20:51:18 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddScatterChart adds a scatter (X/Y) chart.
|
|
|
|
func (_cdfe Chart )AddScatterChart ()ScatterChart {_gbbc :=_b .NewCT_PlotAreaChoice ();_cdfe ._acc .Chart .PlotArea .Choice =append (_cdfe ._acc .Chart .PlotArea .Choice ,_gbbc );_gbbc .ScatterChart =_b .NewCT_ScatterChart ();_egeg :=ScatterChart {_ebaf :_gbbc .ScatterChart };
|
|
|
|
_egeg .InitializeDefaults ();return _egeg ;};func (_gd BarChart )AddAxis (axis Axis ){_cga :=_b .NewCT_UnsignedInt ();_cga .ValAttr =axis .AxisID ();_gd ._ca .AxId =append (_gd ._ca .AxId ,_cga );};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddRadarChart adds a new radar chart to a chart.
|
|
|
|
func (_fbf Chart )AddRadarChart ()RadarChart {_gfec :=_b .NewCT_PlotAreaChoice ();_fbf ._acc .Chart .PlotArea .Choice =append (_fbf ._acc .Chart .PlotArea .Choice ,_gfec );_gfec .RadarChart =_b .NewCT_RadarChart ();_bca :=RadarChart {_eddc :_gfec .RadarChart };
|
|
|
|
_bca .InitializeDefaults ();return _bca ;};func (_dfaf ScatterChartSeries )SetSmooth (b bool ){_dfaf ._eef .Smooth =_b .NewCT_Boolean ();_dfaf ._eef .Smooth .ValAttr =&b ;};
|
2022-01-15 21:17:38 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddLineChart adds a new line chart to a chart.
|
|
|
|
func (_fgb Chart )AddLineChart ()LineChart {_fcb :=_b .NewCT_PlotAreaChoice ();_fgb ._acc .Chart .PlotArea .Choice =append (_fgb ._acc .Chart .PlotArea .Choice ,_fcb );_fcb .LineChart =_b .NewCT_LineChart ();_fcb .LineChart .Grouping =_b .NewCT_Grouping ();
|
|
|
|
_fcb .LineChart .Grouping .ValAttr =_b .ST_GroupingStandard ;return LineChart {_gbge :_fcb .LineChart };};func (_cgd CategoryAxis )MajorGridLines ()GridLines {if _cgd ._dge .MajorGridlines ==nil {_cgd ._dge .MajorGridlines =_b .NewCT_ChartLines ();};return GridLines {_cgd ._dge .MajorGridlines };
|
|
|
|
};func (_fgf LineChartSeries )SetSmooth (b bool ){_fgf ._gag .Smooth =_b .NewCT_Boolean ();_fgf ._gag .Smooth .ValAttr =&b ;};func (_fcc DataLabels )SetShowLegendKey (b bool ){_fcc .ensureChoice ();_fcc ._fbd .Choice .ShowLegendKey =_b .NewCT_Boolean ();
|
|
|
|
_fcc ._fbd .Choice .ShowLegendKey .ValAttr =_f .Bool (b );};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// StockChart is a 2D Stock chart.
|
|
|
|
type StockChart struct{chartBase ;_bbd *_b .CT_StockChart ;};func (_dfeb Marker )Properties ()_a .ShapeProperties {if _dfeb ._fbfg .SpPr ==nil {_dfeb ._fbfg .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_dfeb ._fbfg .SpPr );};
|
2017-09-07 09:08:32 -04:00
|
|
|
|
2024-05-22 00:21:11 +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 (_cdda NumberDataSource )CreateEmptyNumberCache (){_cdda .ensureChoice ();if _cdda ._agf .Choice .NumRef ==nil {_cdda ._agf .Choice .NumRef =_b .NewCT_NumRef ();};_cdda ._agf .Choice .NumLit =nil ;_cdda ._agf .Choice .NumRef .NumCache =_b .NewCT_NumData ();
|
|
|
|
_cdda ._agf .Choice .NumRef .NumCache .PtCount =_b .NewCT_UnsignedInt ();_cdda ._agf .Choice .NumRef .NumCache .PtCount .ValAttr =0;};func (_fce LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _fce ._gag .Cat ==nil {_fce ._gag .Cat =_b .NewCT_AxDataSource ();
|
|
|
|
};return MakeAxisDataSource (_fce ._gag .Cat );};func (_fea Chart )AddSeriesAxis ()SeriesAxis {_gga :=_b .NewCT_SerAx ();if _fea ._acc .Chart .PlotArea .CChoice ==nil {_fea ._acc .Chart .PlotArea .CChoice =_b .NewCT_PlotAreaChoice1 ();};_gga .AxId =_b .NewCT_UnsignedInt ();
|
|
|
|
_gga .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();_fea ._acc .Chart .PlotArea .CChoice .SerAx =append (_fea ._acc .Chart .PlotArea .CChoice .SerAx ,_gga );_gga .Delete =_b .NewCT_Boolean ();_gga .Delete .ValAttr =_f .Bool (false );_gbg :=MakeSeriesAxis (_gga );
|
|
|
|
_gbg .InitializeDefaults ();return _gbg ;};
|
2023-04-15 17:27:31 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_dac BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _dac ._dca .XVal ==nil {_dac ._dca .XVal =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_dac ._dca .XVal );};
|
2023-04-15 17:27:31 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// BubbleChart is a 2D Bubble chart.
|
|
|
|
type BubbleChart struct{chartBase ;_fa *_b .CT_BubbleChart ;};
|
2021-04-23 20:00:00 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Axis is the interface implemented by different axes when assigning to a
|
|
|
|
// chart.
|
|
|
|
type Axis interface{AxisID ()uint32 ;};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults initializes a bar chart series to the default values.
|
|
|
|
func (_da BarChartSeries )InitializeDefaults (){};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetValues sets values directly on a source.
|
|
|
|
func (_eece NumberDataSource )SetValues (v []float64 ){_eece .ensureChoice ();_eece ._agf .Choice .NumRef =nil ;_eece ._agf .Choice .NumLit =_b .NewCT_NumData ();_eece ._agf .Choice .NumLit .PtCount =_b .NewCT_UnsignedInt ();_eece ._agf .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));
|
|
|
|
for _eba ,_baf :=range v {_eece ._agf .Choice .NumLit .Pt =append (_eece ._agf .Choice .NumLit .Pt ,&_b .CT_NumVal {IdxAttr :uint32 (_eba ),V :_e .Sprintf ("\u0025\u0067",_baf )});};};
|
2022-06-27 19:44:23 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddAreaChart adds a new area chart to a chart.
|
|
|
|
func (_ge Chart )AddAreaChart ()AreaChart {_dcf :=_b .NewCT_PlotAreaChoice ();_ge ._acc .Chart .PlotArea .Choice =append (_ge ._acc .Chart .PlotArea .Choice ,_dcf );_dcf .AreaChart =_b .NewCT_AreaChart ();_efd :=AreaChart {_gf :_dcf .AreaChart };_efd .InitializeDefaults ();
|
|
|
|
return _efd ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the Bubble chart to its defaults
|
|
|
|
func (_cgf BubbleChart )InitializeDefaults (){};
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Index returns the index of the series
|
|
|
|
func (_egea SurfaceChartSeries )Index ()uint32 {return _egea ._cac .Idx .ValAttr };func (_bf CategoryAxis )AxisID ()uint32 {return _bf ._dge .AxId .ValAttr };
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Labels returns the data label properties.
|
|
|
|
func (_ddbc LineChartSeries )Labels ()DataLabels {if _ddbc ._gag .DLbls ==nil {_ddbc ._gag .DLbls =_b .NewCT_DLbls ();};return MakeDataLabels (_ddbc ._gag .DLbls );};func (_cgac Title )InitializeDefaults (){_cgac .SetText ("\u0054\u0069\u0074l\u0065");
|
|
|
|
_cgac .RunProperties ().SetSize (16*_bc .Point );_cgac .RunProperties ().SetSolidFill (_c .Black );_cgac .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_cgac .RunProperties ().SetBold (false );};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddAxis adds an axis to a line chart.
|
|
|
|
func (_ggdd LineChart )AddAxis (axis Axis ){_gdf :=_b .NewCT_UnsignedInt ();_gdf .ValAttr =axis .AxisID ();_ggdd ._gbge .AxId =append (_ggdd ._gbge .AxId ,_gdf );};type SeriesAxis struct{_ffe *_b .CT_SerAx };func (_cbdd ValueAxis )AxisID ()uint32 {return _cbdd ._edad .AxId .ValAttr };
|
2022-04-09 14:27:46 +00:00
|
|
|
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetNumberReference is used to set the source data to a range of cells containing
|
|
|
|
// numbers.
|
|
|
|
func (_dcab CategoryAxisDataSource )SetNumberReference (s string ){_dcab ._eb .Choice =_b .NewCT_AxDataSourceChoice ();_dcab ._eb .Choice .NumRef =_b .NewCT_NumRef ();_dcab ._eb .Choice .NumRef .F =s ;};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_bcga PieOfPieChart )X ()*_b .CT_OfPieChart {return _bcga ._cgab };
|
2021-01-04 16:11:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to a bar chart.
|
|
|
|
func (_bge BarChart )AddSeries ()BarChartSeries {_cd :=_bge .nextColor (len (_bge ._ca .Ser ));_aa :=_b .NewCT_BarSer ();_bge ._ca .Ser =append (_bge ._ca .Ser ,_aa );_aa .Idx .ValAttr =uint32 (len (_bge ._ca .Ser )-1);_aa .Order .ValAttr =uint32 (len (_bge ._ca .Ser )-1);
|
|
|
|
_agcf :=BarChartSeries {_aa };_agcf .InitializeDefaults ();_agcf .Properties ().SetSolidFill (_cd );return _agcf ;};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to an Pie chart.
|
|
|
|
func (_gcf PieChart )AddSeries ()PieChartSeries {_ffb :=_b .NewCT_PieSer ();_gcf ._ccg .Ser =append (_gcf ._ccg .Ser ,_ffb );_ffb .Idx .ValAttr =uint32 (len (_gcf ._ccg .Ser )-1);_ffb .Order .ValAttr =uint32 (len (_gcf ._ccg .Ser )-1);_gab :=PieChartSeries {_ffb };
|
|
|
|
_gab .InitializeDefaults ();return _gab ;};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Area3DChart is an area chart that has a shaded area underneath a curve.
|
|
|
|
type Area3DChart struct{chartBase ;_ed *_b .CT_Area3DChart ;};
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to an area chart.
|
|
|
|
func (_ba AreaChart )AddSeries ()AreaChartSeries {_ae :=_ba .nextColor (len (_ba ._gf .Ser ));_fe :=_b .NewCT_AreaSer ();_ba ._gf .Ser =append (_ba ._gf .Ser ,_fe );_fe .Idx .ValAttr =uint32 (len (_ba ._gf .Ser )-1);_fe .Order .ValAttr =uint32 (len (_ba ._gf .Ser )-1);
|
|
|
|
_ag :=AreaChartSeries {_fe };_ag .InitializeDefaults ();_ag .Properties ().SetSolidFill (_ae );return _ag ;};
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetLabelReference is used to set the source data to a range of cells
|
|
|
|
// containing strings.
|
|
|
|
func (_dacb CategoryAxisDataSource )SetLabelReference (s string ){_dacb ._eb .Choice =_b .NewCT_AxDataSourceChoice ();_dacb ._eb .Choice .StrRef =_b .NewCT_StrRef ();_dacb ._eb .Choice .StrRef .F =s ;};
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
|
|
|
|
type RadarChart struct{chartBase ;_eddc *_b .CT_RadarChart ;};func MakeCategoryAxis (x *_b .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
|
2021-04-23 20:00:00 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// PieChartSeries is a series to be used on an Pie chart.
|
|
|
|
type PieChartSeries struct{_agd *_b .CT_PieSer };
|
2017-09-07 09:27:41 -04:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddPieOfPieChart adds a new pie chart to a chart.
|
|
|
|
func (_dgb Chart )AddPieOfPieChart ()PieOfPieChart {_ccf :=_b .NewCT_PlotAreaChoice ();_dgb ._acc .Chart .PlotArea .Choice =append (_dgb ._acc .Chart .PlotArea .Choice ,_ccf );_ccf .OfPieChart =_b .NewCT_OfPieChart ();_eae :=PieOfPieChart {_cgab :_ccf .OfPieChart };
|
|
|
|
_eae .InitializeDefaults ();return _eae ;};
|
2021-08-23 20:44:48 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSurface3DChart adds a new 3D surface chart to a chart.
|
|
|
|
func (_bga Chart )AddSurface3DChart ()Surface3DChart {_gbb :=_b .NewCT_PlotAreaChoice ();_bga ._acc .Chart .PlotArea .Choice =append (_bga ._acc .Chart .PlotArea .Choice ,_gbb );_gbb .Surface3DChart =_b .NewCT_Surface3DChart ();_ebe (_bga ._acc .Chart );
|
|
|
|
_ggb :=Surface3DChart {_bgf :_gbb .Surface3DChart };_ggb .InitializeDefaults ();return _ggb ;};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to a Stock chart.
|
|
|
|
func (_bcb StockChart )AddSeries ()LineChartSeries {_aae :=_b .NewCT_LineSer ();_bcb ._bbd .Ser =append (_bcb ._bbd .Ser ,_aae );_aae .Idx .ValAttr =uint32 (len (_bcb ._bbd .Ser )-1);_aae .Order .ValAttr =uint32 (len (_bcb ._bbd .Ser )-1);_dgde :=LineChartSeries {_aae };
|
|
|
|
_dgde .Values ().CreateEmptyNumberCache ();_dgde .Properties ().LineProperties ().SetNoFill ();return _dgde ;};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_cgb BarChartSeries )X ()*_b .CT_BarSer {return _cgb ._ege };
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_ce Area3DChart )X ()*_b .CT_Area3DChart {return _ce ._ed };
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_fdf AreaChartSeries )Properties ()_a .ShapeProperties {if _fdf ._aec .SpPr ==nil {_fdf ._aec .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_fdf ._aec .SpPr );};func (_ggc Legend )Properties ()_a .ShapeProperties {if _ggc ._fdg .SpPr ==nil {_ggc ._fdg .SpPr =_de .NewCT_ShapeProperties ();
|
|
|
|
};return _a .MakeShapeProperties (_ggc ._fdg .SpPr );};
|
2022-04-09 14:27:46 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetText sets the series text
|
|
|
|
func (_dea SurfaceChartSeries )SetText (s string ){_dea ._cac .Tx =_b .NewCT_SerTx ();_dea ._cac .Tx .Choice .V =&s ;};type Line3DChart struct{chartBase ;_egd *_b .CT_Line3DChart ;};func (_fdc CategoryAxis )SetCrosses (axis Axis ){_fdc ._dge .Choice =_b .NewEG_AxSharedChoice ();
|
|
|
|
_fdc ._dge .Choice .Crosses =_b .NewCT_Crosses ();_fdc ._dge .Choice .Crosses .ValAttr =_b .ST_CrossesAutoZero ;_fdc ._dge .CrossAx .ValAttr =axis .AxisID ();};func (_dag DateAxis )SetMinorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_dag ._aeb .MinorTickMark =nil ;
|
|
|
|
}else {_dag ._aeb .MinorTickMark =_b .NewCT_TickMark ();_dag ._aeb .MinorTickMark .ValAttr =m ;};};func (_bdf ScatterChartSeries )Values ()NumberDataSource {if _bdf ._eef .YVal ==nil {_bdf ._eef .YVal =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_bdf ._eef .YVal );
|
|
|
|
};
|
2023-03-01 18:42:44 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// BarChartSeries is a series to be used on a bar chart.
|
|
|
|
type BarChartSeries struct{_ege *_b .CT_BarSer };
|
2022-02-05 13:05:36 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// DoughnutChart is a Doughnut chart.
|
|
|
|
type DoughnutChart struct{chartBase ;_dfg *_b .CT_DoughnutChart ;};
|
2022-02-05 13:05:36 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_beb RadarChartSeries )Values ()NumberDataSource {if _beb ._cdfd .Val ==nil {_beb ._cdfd .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_beb ._cdfd .Val );};
|
2021-08-23 20:44:48 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_cgffg PieChartSeries )Values ()NumberDataSource {if _cgffg ._agd .Val ==nil {_cgffg ._agd .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_cgffg ._agd .Val );};func (_gdd DateAxis )AxisID ()uint32 {return _gdd ._aeb .AxId .ValAttr };
|
2021-08-23 20:44:48 +00:00
|
|
|
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetValues is used to set the source data to a set of values.
|
|
|
|
func (_cef CategoryAxisDataSource )SetValues (v []string ){_cef ._eb .Choice =_b .NewCT_AxDataSourceChoice ();_cef ._eb .Choice .StrLit =_b .NewCT_StrData ();_cef ._eb .Choice .StrLit .PtCount =_b .NewCT_UnsignedInt ();_cef ._eb .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));
|
|
|
|
for _bce ,_bag :=range v {_cef ._eb .Choice .StrLit .Pt =append (_cef ._eb .Choice .StrLit .Pt ,&_b .CT_StrVal {IdxAttr :uint32 (_bce ),V :_bag });};};func (_feeb NumberDataSource )SetReference (s string ){_feeb .ensureChoice ();if _feeb ._agf .Choice .NumRef ==nil {_feeb ._agf .Choice .NumRef =_b .NewCT_NumRef ();
|
|
|
|
};_feeb ._agf .Choice .NumRef .F =s ;};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddBar3DChart adds a new 3D bar chart to a chart.
|
|
|
|
func (_fae Chart )AddBar3DChart ()Bar3DChart {_ebe (_fae ._acc .Chart );_abb :=_b .NewCT_PlotAreaChoice ();_fae ._acc .Chart .PlotArea .Choice =append (_fae ._acc .Chart .PlotArea .Choice ,_abb );_abb .Bar3DChart =_b .NewCT_Bar3DChart ();_abb .Bar3DChart .Grouping =_b .NewCT_BarGrouping ();
|
|
|
|
_abb .Bar3DChart .Grouping .ValAttr =_b .ST_BarGroupingStandard ;_fde :=Bar3DChart {_ec :_abb .Bar3DChart };_fde .InitializeDefaults ();return _fde ;};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_faf LineChartSeries )SetIndex (idx uint32 ){_faf ._gag .Idx .ValAttr =idx };
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// RadarChartSeries is a series to be used on an Radar chart.
|
|
|
|
type RadarChartSeries struct{_cdfd *_b .CT_RadarSer };
|
2021-06-16 07:10:52 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddCategoryAxis adds a category axis.
|
|
|
|
func (_gbe Chart )AddCategoryAxis ()CategoryAxis {_be :=_b .NewCT_CatAx ();if _gbe ._acc .Chart .PlotArea .CChoice ==nil {_gbe ._acc .Chart .PlotArea .CChoice =_b .NewCT_PlotAreaChoice1 ();};_be .AxId =_b .NewCT_UnsignedInt ();_be .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();
|
|
|
|
_gbe ._acc .Chart .PlotArea .CChoice .CatAx =append (_gbe ._acc .Chart .PlotArea .CChoice .CatAx ,_be );_be .Auto =_b .NewCT_Boolean ();_be .Auto .ValAttr =_f .Bool (true );_be .Delete =_b .NewCT_Boolean ();_be .Delete .ValAttr =_f .Bool (false );_ddb :=MakeCategoryAxis (_be );
|
|
|
|
_ddb .InitializeDefaults ();return _ddb ;};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSurfaceChart adds a new surface chart to a chart.
|
|
|
|
func (_bfe Chart )AddSurfaceChart ()SurfaceChart {_ede :=_b .NewCT_PlotAreaChoice ();_bfe ._acc .Chart .PlotArea .Choice =append (_bfe ._acc .Chart .PlotArea .Choice ,_ede );_ede .SurfaceChart =_b .NewCT_SurfaceChart ();_ebe (_bfe ._acc .Chart );_bfe ._acc .Chart .View3D .RotX .ValAttr =_f .Int8 (90);
|
|
|
|
_bfe ._acc .Chart .View3D .RotY .ValAttr =_f .Uint16 (0);_bfe ._acc .Chart .View3D .Perspective =_b .NewCT_Perspective ();_bfe ._acc .Chart .View3D .Perspective .ValAttr =_f .Uint8 (0);_dace :=SurfaceChart {_efee :_ede .SurfaceChart };_dace .InitializeDefaults ();
|
|
|
|
return _dace ;};
|
2022-06-27 19:44:23 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to a Surface chart.
|
|
|
|
func (_cedc Surface3DChart )AddSeries ()SurfaceChartSeries {_dfd :=_cedc .nextColor (len (_cedc ._bgf .Ser ));_bdfe :=_b .NewCT_SurfaceSer ();_cedc ._bgf .Ser =append (_cedc ._bgf .Ser ,_bdfe );_bdfe .Idx .ValAttr =uint32 (len (_cedc ._bgf .Ser )-1);_bdfe .Order .ValAttr =uint32 (len (_cedc ._bgf .Ser )-1);
|
|
|
|
_afee :=SurfaceChartSeries {_bdfe };_afee .InitializeDefaults ();_afee .Properties ().LineProperties ().SetSolidFill (_dfd );return _afee ;};
|
2022-09-02 11:46:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_dceb BarChartSeries )Values ()NumberDataSource {if _dceb ._ege .Val ==nil {_dceb ._ege .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_dceb ._ege .Val );};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_fb AreaChart )InitializeDefaults (){};type NumberDataSource struct{_agf *_b .CT_NumDataSource };
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// LineChartSeries is the data series for a line chart.
|
|
|
|
type LineChartSeries struct{_gag *_b .CT_LineSer };func (_bb DataLabels )SetShowValue (b bool ){_bb .ensureChoice ();_bb ._fbd .Choice .ShowVal =_b .NewCT_Boolean ();_bb ._fbd .Choice .ShowVal .ValAttr =_f .Bool (b );};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_eea LineChartSeries )SetOrder (idx uint32 ){_eea ._gag .Order .ValAttr =idx };type Marker struct{_fbfg *_b .CT_Marker };
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_cfa SurfaceChartSeries )SetIndex (idx uint32 ){_cfa ._cac .Idx .ValAttr =idx };func (_bfg CategoryAxis )Properties ()_a .ShapeProperties {if _bfg ._dge .SpPr ==nil {_bfg ._dge .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_bfg ._dge .SpPr );
|
|
|
|
};
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_aecg DoughnutChart )InitializeDefaults (){_aecg ._dfg .VaryColors =_b .NewCT_Boolean ();_aecg ._dfg .VaryColors .ValAttr =_f .Bool (true );_aecg ._dfg .HoleSize =_b .NewCT_HoleSize ();_aecg ._dfg .HoleSize .ValAttr =&_b .ST_HoleSize {};_aecg ._dfg .HoleSize .ValAttr .ST_HoleSizeUByte =_f .Uint8 (50);
|
|
|
|
};func (_bac nullAxis )AxisID ()uint32 {return 0};type chartBase struct{};func (_egb DataLabels )SetPosition (p _b .ST_DLblPos ){_egb .ensureChoice ();_egb ._fbd .Choice .DLblPos =_b .NewCT_DLblPos ();_egb ._fbd .Choice .DLblPos .ValAttr =p ;};
|
|
|
|
|
|
|
|
// Values returns the bubble size data source.
|
|
|
|
func (_fc BubbleChartSeries )BubbleSizes ()NumberDataSource {if _fc ._dca .BubbleSize ==nil {_fc ._dca .BubbleSize =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_fc ._dca .BubbleSize );};func MakeNumberDataSource (x *_b .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
|
|
|
|
// AddSeries adds a default series to an Pie3D chart.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_cdad Pie3DChart )AddSeries ()PieChartSeries {_efad :=_b .NewCT_PieSer ();_cdad ._dcadd .Ser =append (_cdad ._dcadd .Ser ,_efad );_efad .Idx .ValAttr =uint32 (len (_cdad ._dcadd .Ser )-1);_efad .Order .ValAttr =uint32 (len (_cdad ._dcadd .Ser )-1);
|
|
|
|
_eced :=PieChartSeries {_efad };_eced .InitializeDefaults ();return _eced ;};func (_gdc DataLabels )SetShowPercent (b bool ){_gdc .ensureChoice ();_gdc ._fbd .Choice .ShowPercent =_b .NewCT_Boolean ();_gdc ._fbd .Choice .ShowPercent .ValAttr =_f .Bool (b );
|
|
|
|
};var NullAxis Axis =nullAxis (0);
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
|
|
|
|
func (_bfd Chart )AddDoughnutChart ()DoughnutChart {_gc :=_b .NewCT_PlotAreaChoice ();_bfd ._acc .Chart .PlotArea .Choice =append (_bfd ._acc .Chart .PlotArea .Choice ,_gc );_gc .DoughnutChart =_b .NewCT_DoughnutChart ();_efa :=DoughnutChart {_dfg :_gc .DoughnutChart };
|
|
|
|
_efa .InitializeDefaults ();return _efa ;};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetText sets the series text
|
|
|
|
func (_egbf ScatterChartSeries )SetText (s string ){_egbf ._eef .Tx =_b .NewCT_SerTx ();_egbf ._eef .Tx .Choice .V =&s ;};func (_ecg SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ecg ._cac .Cat ==nil {_ecg ._cac .Cat =_b .NewCT_AxDataSource ();
|
|
|
|
};return MakeAxisDataSource (_ecg ._cac .Cat );};
|
2023-04-15 17:27:31 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddPie3DChart adds a new pie chart to a chart.
|
|
|
|
func (_ceba Chart )AddPie3DChart ()Pie3DChart {_ebe (_ceba ._acc .Chart );_bfgb :=_b .NewCT_PlotAreaChoice ();_ceba ._acc .Chart .PlotArea .Choice =append (_ceba ._acc .Chart .PlotArea .Choice ,_bfgb );_bfgb .Pie3DChart =_b .NewCT_Pie3DChart ();_efe :=Pie3DChart {_dcadd :_bfgb .Pie3DChart };
|
|
|
|
_efe .InitializeDefaults ();return _efe ;};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// MakeAxisDataSource constructs an AxisDataSource wrapper.
|
|
|
|
func MakeAxisDataSource (x *_b .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};func (_bcfa DateAxis )SetMajorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_bcfa ._aeb .MajorTickMark =nil ;}else {_bcfa ._aeb .MajorTickMark =_b .NewCT_TickMark ();
|
|
|
|
_bcfa ._aeb .MajorTickMark .ValAttr =m ;};};
|
2020-11-09 01:00:18 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// PieOfPieChart is a Pie chart with an extra Pie chart.
|
|
|
|
type PieOfPieChart struct{chartBase ;_cgab *_b .CT_OfPieChart ;};type LineChart struct{chartBase ;_gbge *_b .CT_LineChart ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddLine3DChart adds a new 3D line chart to a chart.
|
|
|
|
func (_fed Chart )AddLine3DChart ()Line3DChart {_ebe (_fed ._acc .Chart );_aac :=_b .NewCT_PlotAreaChoice ();_fed ._acc .Chart .PlotArea .Choice =append (_fed ._acc .Chart .PlotArea .Choice ,_aac );_aac .Line3DChart =_b .NewCT_Line3DChart ();_aac .Line3DChart .Grouping =_b .NewCT_Grouping ();
|
|
|
|
_aac .Line3DChart .Grouping .ValAttr =_b .ST_GroupingStandard ;return Line3DChart {_egd :_aac .Line3DChart };};func (_dcg SurfaceChartSeries )InitializeDefaults (){_dcg .Properties ().LineProperties ().SetWidth (1*_bc .Point );_dcg .Properties ().LineProperties ().SetSolidFill (_c .Black );
|
|
|
|
_dcg .Properties ().LineProperties ().SetJoin (_a .LineJoinRound );};var _eaga =[]_c .Color {_c .RGB (0x33,0x66,0xcc),_c .RGB (0xDC,0x39,0x12),_c .RGB (0xFF,0x99,0x00),_c .RGB (0x10,0x96,0x18),_c .RGB (0x99,0x00,0x99),_c .RGB (0x3B,0x3E,0xAC),_c .RGB (0x00,0x99,0xC6),_c .RGB (0xDD,0x44,0x77),_c .RGB (0x66,0xAA,0x00),_c .RGB (0xB8,0x2E,0x2E),_c .RGB (0x31,0x63,0x95),_c .RGB (0x99,0x44,0x99),_c .RGB (0x22,0xAA,0x99),_c .RGB (0xAA,0xAA,0x11),_c .RGB (0x66,0x33,0xCC),_c .RGB (0xE6,0x73,0x00),_c .RGB (0x8B,0x07,0x07),_c .RGB (0x32,0x92,0x62),_c .RGB (0x55,0x74,0xA6),_c .RGB (0x3B,0x3E,0xAC)};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_bcd Area3DChart )InitializeDefaults (){};func (_dbf SeriesAxis )InitializeDefaults (){};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +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{_eb *_b .CT_AxDataSource };
|
2023-05-26 09:49:04 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Surface3DChart is a 3D view of a surface chart.
|
|
|
|
type Surface3DChart struct{chartBase ;_bgf *_b .CT_Surface3DChart ;};type DateAxis struct{_aeb *_b .CT_DateAx };
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the Stock chart to its defaults
|
|
|
|
func (_cgeg StockChart )InitializeDefaults (){_cgeg ._bbd .HiLowLines =_b .NewCT_ChartLines ();_cgeg ._bbd .UpDownBars =_b .NewCT_UpDownBars ();_cgeg ._bbd .UpDownBars .GapWidth =_b .NewCT_GapAmount ();_cgeg ._bbd .UpDownBars .GapWidth .ValAttr =&_b .ST_GapAmount {};
|
|
|
|
_cgeg ._bbd .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_f .Uint16 (150);_cgeg ._bbd .UpDownBars .UpBars =_b .NewCT_UpDownBar ();_cgeg ._bbd .UpDownBars .DownBars =_b .NewCT_UpDownBar ();};func (_gdb ScatterChart )InitializeDefaults (){_gdb ._ebaf .ScatterStyle .ValAttr =_b .ST_ScatterStyleMarker ;
|
|
|
|
};
|
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-22 00:21:11 +00:00
|
|
|
func (_geb LineChartSeries )Index ()uint32 {return _geb ._gag .Idx .ValAttr };
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_dgd LineChart )X ()*_b .CT_LineChart {return _dgd ._gbge };func (_egg RadarChart )AddAxis (axis Axis ){_aecc :=_b .NewCT_UnsignedInt ();_aecc .ValAttr =axis .AxisID ();_egg ._eddc .AxId =append (_egg ._eddc .AxId ,_aecc );};
|
2020-11-09 01:00:18 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_afc SurfaceChartSeries )X ()*_b .CT_SurfaceSer {return _afc ._cac };func (_gdcg SurfaceChart )InitializeDefaults (){_gdcg ._efee .Wireframe =_b .NewCT_Boolean ();_gdcg ._efee .Wireframe .ValAttr =_f .Bool (false );_gdcg ._efee .BandFmts =_b .NewCT_BandFmts ();
|
|
|
|
for _gcc :=0;_gcc < 15;_gcc ++{_abbb :=_b .NewCT_BandFmt ();_abbb .Idx .ValAttr =uint32 (_gcc );_abbb .SpPr =_de .NewCT_ShapeProperties ();_cbfc :=_a .MakeShapeProperties (_abbb .SpPr );_cbfc .SetSolidFill (_gdcg .nextColor (_gcc ));_gdcg ._efee .BandFmts .BandFmt =append (_gdcg ._efee .BandFmts .BandFmt ,_abbb );
|
|
|
|
};};
|
2022-09-02 11:46:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_aef Chart )X ()*_b .ChartSpace {return _aef ._acc };
|
2022-12-06 11:56:49 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bee Title )X ()*_b .CT_Title {return _bee ._gebf };
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddArea3DChart adds a new area chart to a chart.
|
|
|
|
func (_geg Chart )AddArea3DChart ()Area3DChart {_ebe (_geg ._acc .Chart );_ebg :=_b .NewCT_PlotAreaChoice ();_geg ._acc .Chart .PlotArea .Choice =append (_geg ._acc .Chart .PlotArea .Choice ,_ebg );_ebg .Area3DChart =_b .NewCT_Area3DChart ();_cff :=Area3DChart {_ed :_ebg .Area3DChart };
|
|
|
|
_cff .InitializeDefaults ();return _cff ;};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_aaf ScatterChartSeries )SetOrder (idx uint32 ){_aaf ._eef .Order .ValAttr =idx };type ValueAxis struct{_edad *_b .CT_ValAx };
|
2020-10-12 13:59:12 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// SetDisplayBlanksAs controls how missing values are displayed.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_fgad Chart )SetDisplayBlanksAs (v _b .ST_DispBlanksAs ){_fgad ._acc .Chart .DispBlanksAs =_b .NewCT_DispBlanksAs ();_fgad ._acc .Chart .DispBlanksAs .ValAttr =v ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_cdgc DateAxis )X ()*_b .CT_DateAx {return _cdgc ._aeb };
|
2023-05-26 09:49:04 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_edac BarChartSeries )Properties ()_a .ShapeProperties {if _edac ._ege .SpPr ==nil {_edac ._ege .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_edac ._ege .SpPr );};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Order returns the order of the series
|
|
|
|
func (_bafc ScatterChartSeries )Order ()uint32 {return _bafc ._eef .Order .ValAttr };func (_adcg Legend )SetPosition (p _b .ST_LegendPos ){if p ==_b .ST_LegendPosUnset {_adcg ._fdg .LegendPos =nil ;}else {_adcg ._fdg .LegendPos =_b .NewCT_LegendPos ();
|
|
|
|
_adcg ._fdg .LegendPos .ValAttr =p ;};};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// ScatterChartSeries is the data series for a scatter chart.
|
|
|
|
type ScatterChartSeries struct{_eef *_b .CT_ScatterSer };
|
2022-04-09 14:27:46 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bbg ScatterChart )X ()*_b .CT_ScatterChart {return _bbg ._ebaf };
|
2022-04-09 14:27:46 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Order returns the order of the series
|
|
|
|
func (_gegc SurfaceChartSeries )Order ()uint32 {return _gegc ._cac .Order .ValAttr };func (_fdd CategoryAxis )SetMinorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_fdd ._dge .MinorTickMark =nil ;}else {_fdd ._dge .MinorTickMark =_b .NewCT_TickMark ();
|
|
|
|
_fdd ._dge .MinorTickMark .ValAttr =m ;};};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetIndex sets the index of the series
|
|
|
|
func (_adf ScatterChartSeries )SetIndex (idx uint32 ){_adf ._eef .Idx .ValAttr =idx };func (_afg DataLabels )SetShowSeriesName (b bool ){_afg .ensureChoice ();_afg ._fbd .Choice .ShowSerName =_b .NewCT_Boolean ();_afg ._fbd .Choice .ShowSerName .ValAttr =_f .Bool (b );
|
|
|
|
};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AreaChart is an area chart that has a shaded area underneath a curve.
|
|
|
|
type AreaChart struct{chartBase ;_gf *_b .CT_AreaChart ;};func (_dcae LineChartSeries )Values ()NumberDataSource {if _dcae ._gag .Val ==nil {_dcae ._gag .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_dcae ._gag .Val );};type DataLabels struct{_fbd *_b .CT_DLbls };
|
2024-05-08 13:54:39 +00:00
|
|
|
|
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_geae RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _geae ._cdfd .Cat ==nil {_geae ._cdfd .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_geae ._cdfd .Cat );};
|
|
|
|
|
|
|
|
// AddSeries adds a default series to an area chart.
|
|
|
|
func (_cc Area3DChart )AddSeries ()AreaChartSeries {_ceb :=_cc .nextColor (len (_cc ._ed .Ser ));_dc :=_b .NewCT_AreaSer ();_cc ._ed .Ser =append (_cc ._ed .Ser ,_dc );_dc .Idx .ValAttr =uint32 (len (_cc ._ed .Ser )-1);_dc .Order .ValAttr =uint32 (len (_cc ._ed .Ser )-1);
|
|
|
|
_af :=AreaChartSeries {_dc };_af .InitializeDefaults ();_af .Properties ().SetSolidFill (_ceb );return _af ;};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_bg AreaChartSeries )X ()*_b .CT_AreaSer {return _bg ._aec };func (_gaa ScatterChartSeries )InitializeDefaults (){_gaa .Properties ().LineProperties ().SetNoFill ();_gaa .Marker ().SetSymbol (_b .ST_MarkerStyleAuto );_gaa .Labels ().SetShowLegendKey (false );
|
|
|
|
_gaa .Labels ().SetShowValue (true );_gaa .Labels ().SetShowPercent (false );_gaa .Labels ().SetShowCategoryName (false );_gaa .Labels ().SetShowSeriesName (false );_gaa .Labels ().SetShowLeaderLines (false );};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddLegend adds a legend to a chart, replacing any existing legend.
|
|
|
|
func (_eag Chart )AddLegend ()Legend {_eag ._acc .Chart .Legend =_b .NewCT_Legend ();_cdd :=MakeLegend (_eag ._acc .Chart .Legend );_cdd .InitializeDefaults ();return _cdd ;};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetOrder sets the order of the series
|
|
|
|
func (_fdcc SurfaceChartSeries )SetOrder (idx uint32 ){_fdcc ._cac .Order .ValAttr =idx };
|
|
|
|
|
|
|
|
// AddDateAxis adds a value axis to the chart.
|
|
|
|
func (_gfc Chart )AddDateAxis ()DateAxis {_cda :=_b .NewCT_DateAx ();if _gfc ._acc .Chart .PlotArea .CChoice ==nil {_gfc ._acc .Chart .PlotArea .CChoice =_b .NewCT_PlotAreaChoice1 ();};_cda .AxId =_b .NewCT_UnsignedInt ();_cda .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();
|
|
|
|
_gfc ._acc .Chart .PlotArea .CChoice .DateAx =append (_gfc ._acc .Chart .PlotArea .CChoice .DateAx ,_cda );_cda .Delete =_b .NewCT_Boolean ();_cda .Delete .ValAttr =_f .Bool (false );_cda .Scaling =_b .NewCT_Scaling ();_cda .Scaling .Orientation =_b .NewCT_Orientation ();
|
|
|
|
_cda .Scaling .Orientation .ValAttr =_b .ST_OrientationMinMax ;_cda .Choice =&_b .EG_AxSharedChoice {};_cda .Choice .Crosses =_b .NewCT_Crosses ();_cda .Choice .Crosses .ValAttr =_b .ST_CrossesAutoZero ;_gefe :=DateAxis {_cda };_gefe .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_c .LightGray );
|
|
|
|
_gefe .SetMajorTickMark (_b .ST_TickMarkOut );_gefe .SetMinorTickMark (_b .ST_TickMarkIn );_gefe .SetTickLabelPosition (_b .ST_TickLblPosNextTo );_gefe .Properties ().LineProperties ().SetSolidFill (_c .Black );_gefe .SetPosition (_b .ST_AxPosL );return _gefe ;
|
2024-05-04 18:48:06 +00:00
|
|
|
};
|
2022-02-25 19:20:45 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to a line chart.
|
|
|
|
func (_gge Line3DChart )AddSeries ()LineChartSeries {_gaf :=_gge .nextColor (len (_gge ._egd .Ser ));_faa :=_b .NewCT_LineSer ();_gge ._egd .Ser =append (_gge ._egd .Ser ,_faa );_faa .Idx .ValAttr =uint32 (len (_gge ._egd .Ser )-1);_faa .Order .ValAttr =uint32 (len (_gge ._egd .Ser )-1);
|
|
|
|
_fee :=LineChartSeries {_faa };_fee .InitializeDefaults ();_fee .Properties ().LineProperties ().SetSolidFill (_gaf );_fee .Properties ().SetSolidFill (_gaf );return _fee ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_abe BubbleChartSeries )Values ()NumberDataSource {if _abe ._dca .YVal ==nil {_abe ._dca .YVal =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_abe ._dca .YVal );};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddValueAxis adds a value axis to the chart.
|
|
|
|
func (_efdd Chart )AddValueAxis ()ValueAxis {_efae :=_b .NewCT_ValAx ();if _efdd ._acc .Chart .PlotArea .CChoice ==nil {_efdd ._acc .Chart .PlotArea .CChoice =_b .NewCT_PlotAreaChoice1 ();};_efae .AxId =_b .NewCT_UnsignedInt ();_efae .AxId .ValAttr =0x7FFFFFFF&_d .Uint32 ();
|
|
|
|
_efdd ._acc .Chart .PlotArea .CChoice .ValAx =append (_efdd ._acc .Chart .PlotArea .CChoice .ValAx ,_efae );_efae .Delete =_b .NewCT_Boolean ();_efae .Delete .ValAttr =_f .Bool (false );_efae .Scaling =_b .NewCT_Scaling ();_efae .Scaling .Orientation =_b .NewCT_Orientation ();
|
|
|
|
_efae .Scaling .Orientation .ValAttr =_b .ST_OrientationMinMax ;_efae .Choice =&_b .EG_AxSharedChoice {};_efae .Choice .Crosses =_b .NewCT_Crosses ();_efae .Choice .Crosses .ValAttr =_b .ST_CrossesAutoZero ;_efae .CrossBetween =_b .NewCT_CrossBetween ();
|
|
|
|
_efae .CrossBetween .ValAttr =_b .ST_CrossBetweenBetween ;_edc :=MakeValueAxis (_efae );_edc .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_c .LightGray );_edc .SetMajorTickMark (_b .ST_TickMarkOut );_edc .SetMinorTickMark (_b .ST_TickMarkIn );
|
|
|
|
_edc .SetTickLabelPosition (_b .ST_TickLblPosNextTo );_edc .Properties ().LineProperties ().SetSolidFill (_c .Black );_edc .SetPosition (_b .ST_AxPosL );return _edc ;};func (_gege DateAxis )SetPosition (p _b .ST_AxPos ){_gege ._aeb .AxPos =_b .NewCT_AxPos ();
|
|
|
|
_gege ._aeb .AxPos .ValAttr =p ;};func (_bcf BubbleChart )AddAxis (axis Axis ){_bcff :=_b .NewCT_UnsignedInt ();_bcff .ValAttr =axis .AxisID ();_bcf ._fa .AxId =append (_bcf ._fa .AxId ,_bcff );};
|
2021-03-16 20:51:18 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetDirection changes the direction of the bar chart (bar or column).
|
|
|
|
func (_eda Bar3DChart )SetDirection (d _b .ST_BarDir ){_eda ._ec .BarDir .ValAttr =d };
|
|
|
|
|
|
|
|
// AddSeries adds a default series to a line chart.
|
|
|
|
func (_dbg LineChart )AddSeries ()LineChartSeries {_eec :=_dbg .nextColor (len (_dbg ._gbge .Ser ));_fag :=_b .NewCT_LineSer ();_dbg ._gbge .Ser =append (_dbg ._gbge .Ser ,_fag );_fag .Idx .ValAttr =uint32 (len (_dbg ._gbge .Ser )-1);_fag .Order .ValAttr =uint32 (len (_dbg ._gbge .Ser )-1);
|
|
|
|
_dcd :=LineChartSeries {_fag };_dcd .InitializeDefaults ();_dcd .Properties ().LineProperties ().SetSolidFill (_eec );return _dcd ;};func (_acf SeriesAxis )AxisID ()uint32 {return _acf ._ffe .AxId .ValAttr };func (_ged ValueAxis )SetMajorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_ged ._edad .MajorTickMark =nil ;
|
|
|
|
}else {_ged ._edad .MajorTickMark =_b .NewCT_TickMark ();_ged ._edad .MajorTickMark .ValAttr =m ;};};
|
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-22 00:21:11 +00:00
|
|
|
func (_bcg AreaChart )X ()*_b .CT_AreaChart {return _bcg ._gf };
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AreaChartSeries is a series to be used on an area chart.
|
|
|
|
type AreaChartSeries struct{_aec *_b .CT_AreaSer };
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_eg BarChart )X ()*_b .CT_BarChart {return _eg ._ca };
|
|
|
|
|
|
|
|
// Labels returns the data label properties.
|
|
|
|
func (_aed ScatterChartSeries )Labels ()DataLabels {if _aed ._eef .DLbls ==nil {_aed ._eef .DLbls =_b .NewCT_DLbls ();};return MakeDataLabels (_aed ._eef .DLbls );};
|
|
|
|
|
|
|
|
// AddAxis adds an axis to a Scatter chart.
|
|
|
|
func (_dagb ScatterChart )AddAxis (axis Axis ){_aacf :=_b .NewCT_UnsignedInt ();_aacf .ValAttr =axis .AxisID ();_dagb ._ebaf .AxId =append (_dagb ._ebaf .AxId ,_aacf );};
|
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-22 00:21:11 +00:00
|
|
|
func (_ccc BarChart )InitializeDefaults (){_ccc .SetDirection (_b .ST_BarDirCol )};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fbfa ValueAxis )X ()*_b .CT_ValAx {return _fbfa ._edad };type ScatterChart struct{chartBase ;_ebaf *_b .CT_ScatterChart ;};
|
|
|
|
|
|
|
|
// SetText sets the series text.
|
|
|
|
func (_acbe PieChartSeries )SetText (s string ){_acbe ._agd .Tx =_b .NewCT_SerTx ();_acbe ._agd .Tx .Choice .V =&s ;};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_age Marker )X ()*_b .CT_Marker {return _age ._fbfg };func (_bgb ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bgb ._eef .XVal ==nil {_bgb ._eef .XVal =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_bgb ._eef .XVal );};type GridLines struct{_adc *_b .CT_ChartLines };
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetText sets the series text.
|
|
|
|
func (_edd BubbleChartSeries )SetText (s string ){_edd ._dca .Tx =_b .NewCT_SerTx ();_edd ._dca .Tx .Choice .V =&s ;};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddAxis adds an axis to a line chart.
|
|
|
|
func (_acb Line3DChart )AddAxis (axis Axis ){_gegb :=_b .NewCT_UnsignedInt ();_gegb .ValAttr =axis .AxisID ();_acb ._egd .AxId =append (_acb ._egd .AxId ,_gegb );};type SurfaceChartSeries struct{_cac *_b .CT_SurfaceSer };func (_ddd DataLabels )SetShowLeaderLines (b bool ){_ddd .ensureChoice ();
|
|
|
|
_ddd ._fbd .Choice .ShowLeaderLines =_b .NewCT_Boolean ();_ddd ._fbd .Choice .ShowLeaderLines .ValAttr =_f .Bool (b );};
|
2022-02-25 19:20:45 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Pie3DChart is a Pie3D chart.
|
|
|
|
type Pie3DChart struct{chartBase ;_dcadd *_b .CT_Pie3DChart ;};
|
2020-08-31 22:58:25 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Properties returns the Bubble chart series shape properties.
|
|
|
|
func (_dbd BubbleChartSeries )Properties ()_a .ShapeProperties {if _dbd ._dca .SpPr ==nil {_dbd ._dca .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_dbd ._dca .SpPr );};
|
2020-08-31 22:58:25 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
|
|
|
|
func (_ebgg DoughnutChart )SetHoleSize (pct uint8 ){if _ebgg ._dfg .HoleSize ==nil {_ebgg ._dfg .HoleSize =_b .NewCT_HoleSize ();};if _ebgg ._dfg .HoleSize .ValAttr ==nil {_ebgg ._dfg .HoleSize .ValAttr =&_b .ST_HoleSize {};};_ebgg ._dfg .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;
|
|
|
|
};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_feb PieChart )InitializeDefaults (){_feb ._ccg .VaryColors =_b .NewCT_Boolean ();_feb ._ccg .VaryColors .ValAttr =_f .Bool (true );};type nullAxis byte ;func (_gfeg SeriesAxis )SetCrosses (axis Axis ){_gfeg ._ffe .CrossAx .ValAttr =axis .AxisID ()};
|
|
|
|
func (_cefg DateAxis )SetTickLabelPosition (p _b .ST_TickLblPos ){if p ==_b .ST_TickLblPosUnset {_cefg ._aeb .TickLblPos =nil ;}else {_cefg ._aeb .TickLblPos =_b .NewCT_TickLblPos ();_cefg ._aeb .TickLblPos .ValAttr =p ;};};type CategoryAxis struct{_dge *_b .CT_CatAx };
|
2020-12-17 22:07:08 +00:00
|
|
|
|
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetText sets the series text.
|
|
|
|
func (_efaed RadarChartSeries )SetText (s string ){_efaed ._cdfd .Tx =_b .NewCT_SerTx ();_efaed ._cdfd .Tx .Choice .V =&s ;};
|
2021-01-04 16:11:39 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_ggec StockChart )X ()*_b .CT_StockChart {return _ggec ._bbd };
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_ef Bar3DChart )X ()*_b .CT_Bar3DChart {return _ef ._ec };func (_cde Title )ParagraphProperties ()_a .ParagraphProperties {if _cde ._gebf .Tx ==nil {_cde .SetText ("");};if _cde ._gebf .Tx .Choice .Rich .P [0].PPr ==nil {_cde ._gebf .Tx .Choice .Rich .P [0].PPr =_de .NewCT_TextParagraphProperties ();
|
|
|
|
};return _a .MakeParagraphProperties (_cde ._gebf .Tx .Choice .Rich .P [0].PPr );};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to an Radar chart.
|
|
|
|
func (_caf RadarChart )AddSeries ()RadarChartSeries {_ggea :=_caf .nextColor (len (_caf ._eddc .Ser ));_cfc :=_b .NewCT_RadarSer ();_caf ._eddc .Ser =append (_caf ._eddc .Ser ,_cfc );_cfc .Idx .ValAttr =uint32 (len (_caf ._eddc .Ser )-1);_cfc .Order .ValAttr =uint32 (len (_caf ._eddc .Ser )-1);
|
|
|
|
_dabg :=RadarChartSeries {_cfc };_dabg .InitializeDefaults ();_dabg .Properties ().SetSolidFill (_ggea );return _dabg ;};func (_fca ValueAxis )Properties ()_a .ShapeProperties {if _fca ._edad .SpPr ==nil {_fca ._edad .SpPr =_de .NewCT_ShapeProperties ();
|
|
|
|
};return _a .MakeShapeProperties (_fca ._edad .SpPr );};func (_gea DateAxis )Properties ()_a .ShapeProperties {if _gea ._aeb .SpPr ==nil {_gea ._aeb .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_gea ._aeb .SpPr );};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddBarChart adds a new bar chart to a chart.
|
|
|
|
func (_cgff Chart )AddBarChart ()BarChart {_efc :=_b .NewCT_PlotAreaChoice ();_cgff ._acc .Chart .PlotArea .Choice =append (_cgff ._acc .Chart .PlotArea .Choice ,_efc );_efc .BarChart =_b .NewCT_BarChart ();_efc .BarChart .Grouping =_b .NewCT_BarGrouping ();
|
|
|
|
_efc .BarChart .Grouping .ValAttr =_b .ST_BarGroupingStandard ;_aff :=BarChart {_ca :_efc .BarChart };_aff .InitializeDefaults ();return _aff ;};
|
2023-04-15 17:27:31 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_ggbf PieOfPieChart )InitializeDefaults (){_ggbf ._cgab .VaryColors =_b .NewCT_Boolean ();_ggbf ._cgab .VaryColors .ValAttr =_f .Bool (true );_ggbf .SetType (_b .ST_OfPieTypePie );_ggbf ._cgab .SecondPieSize =_b .NewCT_SecondPieSize ();_ggbf ._cgab .SecondPieSize .ValAttr =&_b .ST_SecondPieSize {};
|
|
|
|
_ggbf ._cgab .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_f .Uint16 (75);_afe :=_b .NewCT_ChartLines ();_afe .SpPr =_de .NewCT_ShapeProperties ();_fff :=_a .MakeShapeProperties (_afe .SpPr );_fff .LineProperties ().SetSolidFill (_c .Auto );_ggbf ._cgab .SerLines =append (_ggbf ._cgab .SerLines ,_afe );
|
|
|
|
};func (_df Area3DChart )AddAxis (axis Axis ){_ab :=_b .NewCT_UnsignedInt ();_ab .ValAttr =axis .AxisID ();_df ._ed .AxId =append (_df ._ed .AxId ,_ab );};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_db Bar3DChart )InitializeDefaults (){_db .SetDirection (_b .ST_BarDirCol )};func (_gbed DataLabels )SetShowCategoryName (b bool ){_gbed .ensureChoice ();_gbed ._fbd .Choice .ShowCatName =_b .NewCT_Boolean ();_gbed ._fbd .Choice .ShowCatName .ValAttr =_f .Bool (b );
|
|
|
|
};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Index returns the index of the series
|
|
|
|
func (_aebe ScatterChartSeries )Index ()uint32 {return _aebe ._eef .Idx .ValAttr };
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetText sets the series text
|
|
|
|
func (_dddc LineChartSeries )SetText (s string ){_dddc ._gag .Tx =_b .NewCT_SerTx ();_dddc ._gag .Tx .Choice .V =&s ;};func (_dce Bar3DChart )AddAxis (axis Axis ){_agc :=_b .NewCT_UnsignedInt ();_agc .ValAttr =axis .AxisID ();_dce ._ec .AxId =append (_dce ._ec .AxId ,_agc );
|
|
|
|
};func (_ggbc ValueAxis )MajorGridLines ()GridLines {if _ggbc ._edad .MajorGridlines ==nil {_ggbc ._edad .MajorGridlines =_b .NewCT_ChartLines ();};return GridLines {_ggbc ._edad .MajorGridlines };};
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddTitle sets a new title on the chart.
|
|
|
|
func (_def Chart )AddTitle ()Title {_def ._acc .Chart .Title =_b .NewCT_Title ();_def ._acc .Chart .Title .Overlay =_b .NewCT_Boolean ();_def ._acc .Chart .Title .Overlay .ValAttr =_f .Bool (false );_def ._acc .Chart .AutoTitleDeleted =_b .NewCT_Boolean ();
|
|
|
|
_def ._acc .Chart .AutoTitleDeleted .ValAttr =_f .Bool (false );_eaf :=MakeTitle (_def ._acc .Chart .Title );_eaf .InitializeDefaults ();return _eaf ;};func (_cf CategoryAxis )SetMajorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_cf ._dge .MajorTickMark =nil ;
|
|
|
|
}else {_cf ._dge .MajorTickMark =_b .NewCT_TickMark ();_cf ._dge .MajorTickMark .ValAttr =m ;};};func (_gfe CategoryAxis )InitializeDefaults (){_gfe .SetPosition (_b .ST_AxPosB );_gfe .SetMajorTickMark (_b .ST_TickMarkOut );_gfe .SetMinorTickMark (_b .ST_TickMarkIn );
|
|
|
|
_gfe .SetTickLabelPosition (_b .ST_TickLblPosNextTo );_gfe .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_c .LightGray );_gfe .Properties ().LineProperties ().SetSolidFill (_c .Black );};
|
2021-05-31 16:22:30 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetType sets the type the secone pie to either pie or bar
|
|
|
|
func (_cge PieOfPieChart )SetType (t _b .ST_OfPieType ){_cge ._cgab .OfPieType .ValAttr =t };
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Marker returns the marker properties.
|
|
|
|
func (_fab ScatterChartSeries )Marker ()Marker {if _fab ._eef .Marker ==nil {_fab ._eef .Marker =_b .NewCT_Marker ();};return MakeMarker (_fab ._eef .Marker );};func MakeChart (x *_b .ChartSpace )Chart {return Chart {x }};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Bar3DChart is a 3D bar chart.
|
|
|
|
type Bar3DChart struct{chartBase ;_ec *_b .CT_Bar3DChart ;};func MakeValueAxis (x *_b .CT_ValAx )ValueAxis {return ValueAxis {x }};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Values returns the value data source.
|
|
|
|
func (_dd AreaChartSeries )Values ()NumberDataSource {if _dd ._aec .Val ==nil {_dd ._aec .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_dd ._aec .Val );};
|
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-22 00:21:11 +00:00
|
|
|
func (_cb BubbleChart )X ()*_b .CT_BubbleChart {return _cb ._fa };func (_dba NumberDataSource )ensureChoice (){if _dba ._agf .Choice ==nil {_dba ._agf .Choice =_b .NewCT_NumDataSourceChoice ();};};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to an Doughnut chart.
|
|
|
|
func (_ddbb DoughnutChart )AddSeries ()PieChartSeries {_defb :=_b .NewCT_PieSer ();_ddbb ._dfg .Ser =append (_ddbb ._dfg .Ser ,_defb );_defb .Idx .ValAttr =uint32 (len (_ddbb ._dfg .Ser )-1);_defb .Order .ValAttr =uint32 (len (_ddbb ._dfg .Ser )-1);_dcad :=PieChartSeries {_defb };
|
|
|
|
_dcad .InitializeDefaults ();return _dcad ;};
|
2021-11-10 11:45:21 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// RemoveTitle removes any existing title from the chart.
|
|
|
|
func (_abd Chart )RemoveTitle (){_abd ._acc .Chart .Title =nil ;_abd ._acc .Chart .AutoTitleDeleted =_b .NewCT_Boolean ();_abd ._acc .Chart .AutoTitleDeleted .ValAttr =_f .Bool (true );};
|
2021-11-10 11:45:21 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Properties returns the chart's shape properties.
|
|
|
|
func (_cce Chart )Properties ()_a .ShapeProperties {if _cce ._acc .SpPr ==nil {_cce ._acc .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_cce ._acc .SpPr );};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to a Scatter chart.
|
|
|
|
func (_fda ScatterChart )AddSeries ()ScatterChartSeries {_dee :=_fda .nextColor (len (_fda ._ebaf .Ser ));_gec :=_b .NewCT_ScatterSer ();_fda ._ebaf .Ser =append (_fda ._ebaf .Ser ,_gec );_gec .Idx .ValAttr =uint32 (len (_fda ._ebaf .Ser )-1);_gec .Order .ValAttr =uint32 (len (_fda ._ebaf .Ser )-1);
|
|
|
|
_fdeb :=ScatterChartSeries {_gec };_fdeb .InitializeDefaults ();_fdeb .Marker ().Properties ().LineProperties ().SetSolidFill (_dee );_fdeb .Marker ().Properties ().SetSolidFill (_dee );return _fdeb ;};func _ebe (_fga *_b .CT_Chart ){_fga .View3D =_b .NewCT_View3D ();
|
|
|
|
_fga .View3D .RotX =_b .NewCT_RotX ();_fga .View3D .RotX .ValAttr =_f .Int8 (15);_fga .View3D .RotY =_b .NewCT_RotY ();_fga .View3D .RotY .ValAttr =_f .Uint16 (20);_fga .View3D .RAngAx =_b .NewCT_Boolean ();_fga .View3D .RAngAx .ValAttr =_f .Bool (false );
|
|
|
|
_fga .Floor =_b .NewCT_Surface ();_fga .Floor .Thickness =_b .NewCT_Thickness ();_fga .Floor .Thickness .ValAttr .Uint32 =_f .Uint32 (0);_fga .SideWall =_b .NewCT_Surface ();_fga .SideWall .Thickness =_b .NewCT_Thickness ();_fga .SideWall .Thickness .ValAttr .Uint32 =_f .Uint32 (0);
|
|
|
|
_fga .BackWall =_b .NewCT_Surface ();_fga .BackWall .Thickness =_b .NewCT_Thickness ();_fga .BackWall .Thickness .ValAttr .Uint32 =_f .Uint32 (0);};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_cfg PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cfg ._agd .Cat ==nil {_cfg ._agd .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_cfg ._agd .Cat );};func (_ccb ValueAxis )SetMinorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_ccb ._edad .MinorTickMark =nil ;
|
|
|
|
}else {_ccb ._edad .MinorTickMark =_b .NewCT_TickMark ();_ccb ._edad .MinorTickMark .ValAttr =m ;};};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_fcg Pie3DChart )InitializeDefaults (){_fcg ._dcadd .VaryColors =_b .NewCT_Boolean ();_fcg ._dcadd .VaryColors .ValAttr =_f .Bool (true );};func MakeLegend (l *_b .CT_Legend )Legend {return Legend {l }};
|
2017-09-04 10:50:29 -05:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_fedc RadarChart )X ()*_b .CT_RadarChart {return _fedc ._eddc };
|
2021-11-10 11:45:21 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_caa SurfaceChart )X ()*_b .CT_SurfaceChart {return _caa ._efee };
|
2021-01-04 16:11:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddAxis adds an axis to a Surface chart.
|
|
|
|
func (_dabc Surface3DChart )AddAxis (axis Axis ){_dcde :=_b .NewCT_UnsignedInt ();_dcde .ValAttr =axis .AxisID ();_dabc ._bgf .AxId =append (_dabc ._bgf .AxId ,_dcde );};
|
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-22 00:21:11 +00:00
|
|
|
func (_aga Line3DChart )X ()*_b .CT_Line3DChart {return _aga ._egd };
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Chart is a generic chart.
|
|
|
|
type Chart struct{_acc *_b .ChartSpace };
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults initializes an Radar series to the default values.
|
|
|
|
func (_cbf RadarChartSeries )InitializeDefaults (){};func (_fgce Title )SetText (s string ){if _fgce ._gebf .Tx ==nil {_fgce ._gebf .Tx =_b .NewCT_Tx ();};if _fgce ._gebf .Tx .Choice .Rich ==nil {_fgce ._gebf .Tx .Choice .Rich =_de .NewCT_TextBody ();};
|
|
|
|
var _acca *_de .CT_TextParagraph ;if len (_fgce ._gebf .Tx .Choice .Rich .P )==0{_acca =_de .NewCT_TextParagraph ();_fgce ._gebf .Tx .Choice .Rich .P =[]*_de .CT_TextParagraph {_acca };}else {_acca =_fgce ._gebf .Tx .Choice .Rich .P [0];};var _baef *_de .EG_TextRun ;
|
|
|
|
if len (_acca .EG_TextRun )==0{_baef =_de .NewEG_TextRun ();_acca .EG_TextRun =[]*_de .EG_TextRun {_baef };}else {_baef =_acca .EG_TextRun [0];};if _baef .R ==nil {_baef .R =_de .NewCT_RegularTextRun ();};_baef .R .T =s ;};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddBubbleChart adds a new bubble chart.
|
|
|
|
func (_fgba Chart )AddBubbleChart ()BubbleChart {_gef :=_b .NewCT_PlotAreaChoice ();_fgba ._acc .Chart .PlotArea .Choice =append (_fgba ._acc .Chart .PlotArea .Choice ,_gef );_gef .BubbleChart =_b .NewCT_BubbleChart ();_ad :=BubbleChart {_fa :_gef .BubbleChart };
|
|
|
|
_ad .InitializeDefaults ();return _ad ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to an Pie chart.
|
|
|
|
func (_bfca PieOfPieChart )AddSeries ()PieChartSeries {_dfa :=_b .NewCT_PieSer ();_bfca ._cgab .Ser =append (_bfca ._cgab .Ser ,_dfa );_dfa .Idx .ValAttr =uint32 (len (_bfca ._cgab .Ser )-1);_dfa .Order .ValAttr =uint32 (len (_bfca ._cgab .Ser )-1);_ffg :=PieChartSeries {_dfa };
|
|
|
|
_ffg .InitializeDefaults ();return _ffg ;};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults initializes an area series to the default values.
|
|
|
|
func (_ac AreaChartSeries )InitializeDefaults (){};func (_defe DateAxis )MajorGridLines ()GridLines {if _defe ._aeb .MajorGridlines ==nil {_defe ._aeb .MajorGridlines =_b .NewCT_ChartLines ();};return GridLines {_defe ._aeb .MajorGridlines };};
|
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-22 00:21:11 +00:00
|
|
|
func (_cgdg Surface3DChart )X ()*_b .CT_Surface3DChart {return _cgdg ._bgf };
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddStockChart adds a new stock chart.
|
|
|
|
func (_aaa Chart )AddStockChart ()StockChart {_bde :=_b .NewCT_PlotAreaChoice ();_aaa ._acc .Chart .PlotArea .Choice =append (_aaa ._acc .Chart .PlotArea .Choice ,_bde );_bde .StockChart =_b .NewCT_StockChart ();_cgae :=StockChart {_bbd :_bde .StockChart };
|
|
|
|
_cgae .InitializeDefaults ();return _cgae ;};func (_bcc Marker )SetSymbol (s _b .ST_MarkerStyle ){if s ==_b .ST_MarkerStyleUnset {_bcc ._fbfg .Symbol =nil ;}else {_bcc ._fbfg .Symbol =_b .NewCT_MarkerStyle ();_bcc ._fbfg .Symbol .ValAttr =s ;};};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_cdf BubbleChartSeries )X ()*_b .CT_BubbleSer {return _cdf ._dca };func (_cgg DateAxis )SetCrosses (axis Axis ){_cgg ._aeb .CrossAx .ValAttr =axis .AxisID ()};
|
2021-04-23 20:00:00 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults the bar chart to its defaults
|
|
|
|
func (_fccd RadarChart )InitializeDefaults (){_fccd ._eddc .RadarStyle .ValAttr =_b .ST_RadarStyleMarker };
|
2021-07-30 17:03:26 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_bae ScatterChartSeries )X ()*_b .CT_ScatterSer {return _bae ._eef };
|
2021-09-22 16:41:01 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_defd LineChartSeries )X ()*_b .CT_LineSer {return _defd ._gag };
|
2022-01-15 21:17:38 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to a Surface chart.
|
|
|
|
func (_cgag SurfaceChart )AddSeries ()SurfaceChartSeries {_bcbf :=_cgag .nextColor (len (_cgag ._efee .Ser ));_dfde :=_b .NewCT_SurfaceSer ();_cgag ._efee .Ser =append (_cgag ._efee .Ser ,_dfde );_dfde .Idx .ValAttr =uint32 (len (_cgag ._efee .Ser )-1);
|
|
|
|
_dfde .Order .ValAttr =uint32 (len (_cgag ._efee .Ser )-1);_fgc :=SurfaceChartSeries {_dfde };_fgc .InitializeDefaults ();_fgc .Properties ().LineProperties ().SetSolidFill (_bcbf );return _fgc ;};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetExplosion sets the value that the segements of the pie are 'exploded' by
|
|
|
|
func (_gfeb PieChartSeries )SetExplosion (v uint32 ){_gfeb ._agd .Explosion =_b .NewCT_UnsignedInt ();_gfeb ._agd .Explosion .ValAttr =v ;};func MakeMarker (x *_b .CT_Marker )Marker {return Marker {x }};
|
2023-06-10 07:12:37 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// BubbleChartSeries is a series to be used on a Bubble chart.
|
|
|
|
type BubbleChartSeries struct{_dca *_b .CT_BubbleSer };
|
2023-07-04 11:04:03 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// BarChart is a 2D bar chart.
|
|
|
|
type BarChart struct{chartBase ;_ca *_b .CT_BarChart ;};
|
2023-08-06 17:57:53 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_dbdb PieChartSeries )X ()*_b .CT_PieSer {return _dbdb ._agd };func (_bfc Legend )InitializeDefaults (){_bfc .SetPosition (_b .ST_LegendPosR );_bfc .SetOverlay (false );_bfc .Properties ().SetNoFill ();_bfc .Properties ().LineProperties ().SetNoFill ();
|
|
|
|
};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults initializes a Bubble chart series to the default values.
|
|
|
|
func (_bda BubbleChartSeries )InitializeDefaults (){};func (_cgffb ValueAxis )SetCrosses (axis Axis ){_cgffb ._edad .CrossAx .ValAttr =axis .AxisID ()};func (_ffeb ValueAxis )SetTickLabelPosition (p _b .ST_TickLblPos ){if p ==_b .ST_TickLblPosUnset {_ffeb ._edad .TickLblPos =nil ;
|
|
|
|
}else {_ffeb ._edad .TickLblPos =_b .NewCT_TickLblPos ();_ffeb ._edad .TickLblPos .ValAttr =p ;};};func (_dg AreaChart )AddAxis (axis Axis ){_fd :=_b .NewCT_UnsignedInt ();_fd .ValAttr =axis .AxisID ();_dg ._gf .AxId =append (_dg ._gf .AxId ,_fd );};
|
2022-12-06 11:56:49 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddAxis adds an axis to a Surface chart.
|
|
|
|
func (_abba SurfaceChart )AddAxis (axis Axis ){_dacea :=_b .NewCT_UnsignedInt ();_dacea .ValAttr =axis .AxisID ();_abba ._efee .AxId =append (_abba ._efee .AxId ,_dacea );};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_cbg RadarChartSeries )X ()*_b .CT_RadarSer {return _cbg ._cdfd };type Title struct{_gebf *_b .CT_Title };
|
2023-03-01 18:42:44 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetDirection changes the direction of the bar chart (bar or column).
|
|
|
|
func (_gb BarChart )SetDirection (d _b .ST_BarDir ){_gb ._ca .BarDir .ValAttr =d };func (_egc SurfaceChartSeries )Values ()NumberDataSource {if _egc ._cac .Val ==nil {_egc ._cac .Val =_b .NewCT_NumDataSource ();};_cgdd :=MakeNumberDataSource (_egc ._cac .Val );
|
|
|
|
_cgdd .CreateEmptyNumberCache ();return _cgdd ;};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Marker returns the marker properties.
|
|
|
|
func (_cbd LineChartSeries )Marker ()Marker {if _cbd ._gag .Marker ==nil {_cbd ._gag .Marker =_b .NewCT_Marker ();};return MakeMarker (_cbd ._gag .Marker );};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// PieChart is a Pie chart.
|
|
|
|
type PieChart struct{chartBase ;_ccg *_b .CT_PieChart ;};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Order returns the order of the series
|
|
|
|
func (_afge LineChartSeries )Order ()uint32 {return _afge ._gag .Order .ValAttr };
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
|
|
|
func (_cgdb RadarChartSeries )Properties ()_a .ShapeProperties {if _cgdb ._cdfd .SpPr ==nil {_cgdb ._cdfd .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_cgdb ._cdfd .SpPr );};
|
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-22 00:21:11 +00:00
|
|
|
func (_ece Pie3DChart )X ()*_b .CT_Pie3DChart {return _ece ._dcadd };func (_dfc StockChart )AddAxis (axis Axis ){_abed :=_b .NewCT_UnsignedInt ();_abed .ValAttr =axis .AxisID ();_dfc ._bbd .AxId =append (_dfc ._bbd .AxId ,_abed );};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_ced GridLines )X ()*_b .CT_ChartLines {return _ced ._adc };func (_ga DataLabels )ensureChoice (){if _ga ._fbd .Choice ==nil {_ga ._fbd .Choice =_b .NewCT_DLblsChoice ();};};
|
2023-09-16 17:56:36 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_cbe LineChartSeries )Properties ()_a .ShapeProperties {if _cbe ._gag .SpPr ==nil {_cbe ._gag .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_cbe ._gag .SpPr );};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SetText sets the series text.
|
|
|
|
func (_aad BarChartSeries )SetText (s string ){_aad ._ege .Tx =_b .NewCT_SerTx ();_aad ._ege .Tx .Choice .V =&s ;};func MakeTitle (x *_b .CT_Title )Title {return Title {x }};func (_ggbg chartBase )nextColor (_acgc int )_c .Color {return _eaga [_acgc %len (_eaga )]};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-02-17 03:37:07 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// InitializeDefaults initializes an Pie series to the default values.
|
|
|
|
func (_gda PieChartSeries )InitializeDefaults (){};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// AddSeries adds a default series to a Bubble chart.
|
|
|
|
func (_dab BubbleChart )AddSeries ()BubbleChartSeries {_ff :=_dab .nextColor (len (_dab ._fa .Ser ));_ggf :=_b .NewCT_BubbleSer ();_dab ._fa .Ser =append (_dab ._fa .Ser ,_ggf );_ggf .Idx .ValAttr =uint32 (len (_dab ._fa .Ser )-1);_ggf .Order .ValAttr =uint32 (len (_dab ._fa .Ser )-1);
|
|
|
|
_fg :=BubbleChartSeries {_ggf };_fg .InitializeDefaults ();_fg .Properties ().SetSolidFill (_ff );return _fg ;};
|
2024-05-04 18:48:06 +00:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// Properties returns the bar chart series shape properties.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_eab PieChartSeries )Properties ()_a .ShapeProperties {if _eab ._agd .SpPr ==nil {_eab ._agd .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_eab ._agd .SpPr );};func (_dae Legend )SetOverlay (b bool ){_dae ._fdg .Overlay =_b .NewCT_Boolean ();
|
|
|
|
_dae ._fdg .Overlay .ValAttr =_f .Bool (b );};func (_eac LineChartSeries )InitializeDefaults (){_eac .Properties ().LineProperties ().SetWidth (1*_bc .Point );_eac .Properties ().LineProperties ().SetSolidFill (_c .Black );_eac .Properties ().LineProperties ().SetJoin (_a .LineJoinRound );
|
|
|
|
_eac .Marker ().SetSymbol (_b .ST_MarkerStyleNone );_eac .Labels ().SetShowLegendKey (false );_eac .Labels ().SetShowValue (false );_eac .Labels ().SetShowPercent (false );_eac .Labels ().SetShowCategoryName (false );_eac .Labels ().SetShowSeriesName (false );
|
|
|
|
_eac .Labels ().SetShowLeaderLines (false );};func (_cea Marker )SetSize (sz uint8 ){_cea ._fbfg .Size =_b .NewCT_MarkerSize ();_cea ._fbfg .Size .ValAttr =&sz ;};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-05-08 13:54:39 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
2024-05-22 00:21:11 +00:00
|
|
|
func (_cgbd PieChart )X ()*_b .CT_PieChart {return _cgbd ._ccg };func (_cfb Surface3DChart )InitializeDefaults (){_cfb ._bgf .Wireframe =_b .NewCT_Boolean ();_cfb ._bgf .Wireframe .ValAttr =_f .Bool (false );_cfb ._bgf .BandFmts =_b .NewCT_BandFmts ();
|
|
|
|
for _cee :=0;_cee < 15;_cee ++{_fcef :=_b .NewCT_BandFmt ();_fcef .Idx .ValAttr =uint32 (_cee );_fcef .SpPr =_de .NewCT_ShapeProperties ();_cbc :=_a .MakeShapeProperties (_fcef .SpPr );_cbc .SetSolidFill (_cfb .nextColor (_cee ));_cfb ._bgf .BandFmts .BandFmt =append (_cfb ._bgf .BandFmts .BandFmt ,_fcef );
|
|
|
|
};};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// RemoveLegend removes the legend if the chart has one.
|
|
|
|
func (_cdg Chart )RemoveLegend (){_cdg ._acc .Chart .Legend =nil };
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_bd BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bd ._ege .Cat ==nil {_bd ._ege .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_bd ._ege .Cat );};
|
2023-12-28 15:53:06 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// SurfaceChart is a 3D surface chart, viewed from the top-down.
|
|
|
|
type SurfaceChart struct{chartBase ;_efee *_b .CT_SurfaceChart ;};type Legend struct{_fdg *_b .CT_Legend };func MakeDataLabels (x *_b .CT_DLbls )DataLabels {return DataLabels {x }};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fcbe SeriesAxis )X ()*_b .CT_SerAx {return _fcbe ._ffe };func (_dgf CategoryAxis )SetTickLabelPosition (p _b .ST_TickLblPos ){if p ==_b .ST_TickLblPosUnset {_dgf ._dge .TickLblPos =nil ;}else {_dgf ._dge .TickLblPos =_b .NewCT_TickLblPos ();_dgf ._dge .TickLblPos .ValAttr =p ;
|
|
|
|
};};
|
2024-05-08 13:54:39 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// CategoryAxis returns the category data source.
|
|
|
|
func (_gg AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gg ._aec .Cat ==nil {_gg ._aec .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_gg ._aec .Cat );};
|
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-22 00:21:11 +00:00
|
|
|
func (_bfb Legend )X ()*_b .CT_Legend {return _bfb ._fdg };func (_ee CategoryAxis )SetPosition (p _b .ST_AxPos ){_ee ._dge .AxPos =_b .NewCT_AxPos ();_ee ._dge .AxPos .ValAttr =p ;};
|
2023-12-12 23:20:29 +00:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_dbfc SurfaceChartSeries )Properties ()_a .ShapeProperties {if _dbfc ._cac .SpPr ==nil {_dbfc ._cac .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_dbfc ._cac .SpPr );};
|
2024-04-03 00:10:23 +07:00
|
|
|
|
2024-05-22 00:21:11 +00:00
|
|
|
// Properties returns the line chart series shape properties.
|
|
|
|
func (_aag ScatterChartSeries )Properties ()_a .ShapeProperties {if _aag ._eef .SpPr ==nil {_aag ._eef .SpPr =_de .NewCT_ShapeProperties ();};return _a .MakeShapeProperties (_aag ._eef .SpPr );};
|
|
|
|
|
|
|
|
// SetText sets the series text.
|
|
|
|
func (_acg AreaChartSeries )SetText (s string ){_acg ._aec .Tx =_b .NewCT_SerTx ();_acg ._aec .Tx .Choice .V =&s ;};func (_bfeb GridLines )Properties ()_a .ShapeProperties {if _bfeb ._adc .SpPr ==nil {_bfeb ._adc .SpPr =_de .NewCT_ShapeProperties ();};
|
|
|
|
return _a .MakeShapeProperties (_bfeb ._adc .SpPr );};
|
|
|
|
|
|
|
|
// X returns the inner wrapped XML type.
|
|
|
|
func (_fdca DoughnutChart )X ()*_b .CT_DoughnutChart {return _fdca ._dfg };func (_cdc Title )RunProperties ()_a .RunProperties {if _cdc ._gebf .Tx ==nil {_cdc .SetText ("");};if _cdc ._gebf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_cdc ._gebf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_de .NewCT_TextCharacterProperties ();
|
|
|
|
};return _a .MakeRunProperties (_cdc ._gebf .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};func MakeSeriesAxis (x *_b .CT_SerAx )SeriesAxis {return SeriesAxis {x }};
|
|
|
|
|
|
|
|
// AddPieChart adds a new pie chart to a chart.
|
|
|
|
func (_ea Chart )AddPieChart ()PieChart {_fgg :=_b .NewCT_PlotAreaChoice ();_ea ._acc .Chart .PlotArea .Choice =append (_ea ._acc .Chart .PlotArea .Choice ,_fgg );_fgg .PieChart =_b .NewCT_PieChart ();_ggd :=PieChart {_ccg :_fgg .PieChart };_ggd .InitializeDefaults ();
|
|
|
|
return _ggd ;};func (_ddg ValueAxis )SetPosition (p _b .ST_AxPos ){_ddg ._edad .AxPos =_b .NewCT_AxPos ();_ddg ._edad .AxPos .ValAttr =p ;};
|