unioffice/chart/chart.go

531 lines
58 KiB
Go
Raw Normal View History

//
2020-08-23 14:15:53 +00:00
// Copyright 2020 FoxyUtils ehf. All rights reserved.
//
// This is a commercial product and requires a license to operate.
// A trial license can be obtained at https://unidoc.io
//
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
//
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
2022-06-27 19:44:23 +00:00
package chart ;import (_f "fmt";_bd "github.com/unidoc/unioffice";_a "github.com/unidoc/unioffice/color";_bgd "github.com/unidoc/unioffice/drawing";_d "github.com/unidoc/unioffice/measurement";_c "github.com/unidoc/unioffice/schema/soo/dml";_b "github.com/unidoc/unioffice/schema/soo/dml/chart";_bg "math/rand";);func (_fdcb CategoryAxis )SetMinorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_fdcb ._egd .MinorTickMark =nil ;}else {_fdcb ._egd .MinorTickMark =_b .NewCT_TickMark ();_fdcb ._egd .MinorTickMark .ValAttr =m ;};};
2022-06-27 19:44:23 +00:00
// SetHoleSize controls the hole size in the pie chart and is measured in percent.
func (_abec DoughnutChart )SetHoleSize (pct uint8 ){if _abec ._cbd .HoleSize ==nil {_abec ._cbd .HoleSize =_b .NewCT_HoleSize ();};if _abec ._cbd .HoleSize .ValAttr ==nil {_abec ._cbd .HoleSize .ValAttr =&_b .ST_HoleSize {};};_abec ._cbd .HoleSize .ValAttr .ST_HoleSizeUByte =&pct ;};func (_bed LineChartSeries )SetSmooth (b bool ){_bed ._fbeg .Smooth =_b .NewCT_Boolean ();_bed ._fbeg .Smooth .ValAttr =&b ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddBar3DChart adds a new 3D bar chart to a chart.
func (_ega Chart )AddBar3DChart ()Bar3DChart {_bf (_ega ._gbf .Chart );_bae :=_b .NewCT_PlotAreaChoice ();_ega ._gbf .Chart .PlotArea .Choice =append (_ega ._gbf .Chart .PlotArea .Choice ,_bae );_bae .Bar3DChart =_b .NewCT_Bar3DChart ();_bae .Bar3DChart .Grouping =_b .NewCT_BarGrouping ();_bae .Bar3DChart .Grouping .ValAttr =_b .ST_BarGroupingStandard ;_bbe :=Bar3DChart {_bde :_bae .Bar3DChart };_bbe .InitializeDefaults ();return _bbe ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// SetText sets the series text.
func (_ffb BarChartSeries )SetText (s string ){_ffb ._ff .Tx =_b .NewCT_SerTx ();_ffb ._ff .Tx .Choice .V =&s ;};
2021-06-16 07:10:52 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_gcd LineChart )X ()*_b .CT_LineChart {return _gcd ._ebae };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// LineChartSeries is the data series for a line chart.
type LineChartSeries struct{_fbeg *_b .CT_LineSer };func MakeNumberDataSource (x *_b .CT_NumDataSource )NumberDataSource {return NumberDataSource {x }};func (_ccdg Title )RunProperties ()_bgd .RunProperties {if _ccdg ._dbbb .Tx ==nil {_ccdg .SetText ("");};if _ccdg ._dbbb .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr ==nil {_ccdg ._dbbb .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr =_c .NewCT_TextCharacterProperties ();};return _bgd .MakeRunProperties (_ccdg ._dbbb .Tx .Choice .Rich .P [0].EG_TextRun [0].R .RPr );};
2021-05-31 16:22:30 +00:00
2022-06-27 19:44:23 +00:00
// MakeAxisDataSource constructs an AxisDataSource wrapper.
func MakeAxisDataSource (x *_b .CT_AxDataSource )CategoryAxisDataSource {return CategoryAxisDataSource {x };};
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// AddAxis adds an axis to a line chart.
func (_gea Line3DChart )AddAxis (axis Axis ){_efd :=_b .NewCT_UnsignedInt ();_efd .ValAttr =axis .AxisID ();_gea ._adg .AxId =append (_gea ._adg .AxId ,_efd );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddLegend adds a legend to a chart, replacing any existing legend.
func (_bbf Chart )AddLegend ()Legend {_bbf ._gbf .Chart .Legend =_b .NewCT_Legend ();_gdcd :=MakeLegend (_bbf ._gbf .Chart .Legend );_gdcd .InitializeDefaults ();return _gdcd ;};func (_gcde ValueAxis )SetTickLabelPosition (p _b .ST_TickLblPos ){if p ==_b .ST_TickLblPosUnset {_gcde ._eaa .TickLblPos =nil ;}else {_gcde ._eaa .TickLblPos =_b .NewCT_TickLblPos ();_gcde ._eaa .TickLblPos .ValAttr =p ;};};func MakeMarker (x *_b .CT_Marker )Marker {return Marker {x }};func (_fde DataLabels )SetShowPercent (b bool ){_fde .ensureChoice ();_fde ._gaf .Choice .ShowPercent =_b .NewCT_Boolean ();_fde ._gaf .Choice .ShowPercent .ValAttr =_bd .Bool (b );};func (_badc Title )ParagraphProperties ()_bgd .ParagraphProperties {if _badc ._dbbb .Tx ==nil {_badc .SetText ("");};if _badc ._dbbb .Tx .Choice .Rich .P [0].PPr ==nil {_badc ._dbbb .Tx .Choice .Rich .P [0].PPr =_c .NewCT_TextParagraphProperties ();};return _bgd .MakeParagraphProperties (_badc ._dbbb .Tx .Choice .Rich .P [0].PPr );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// Index returns the index of the series
func (_gfg LineChartSeries )Index ()uint32 {return _gfg ._fbeg .Idx .ValAttr };func (_dcg ScatterChartSeries )InitializeDefaults (){_dcg .Properties ().LineProperties ().SetNoFill ();_dcg .Marker ().SetSymbol (_b .ST_MarkerStyleAuto );_dcg .Labels ().SetShowLegendKey (false );_dcg .Labels ().SetShowValue (true );_dcg .Labels ().SetShowPercent (false );_dcg .Labels ().SetShowCategoryName (false );_dcg .Labels ().SetShowSeriesName (false );_dcg .Labels ().SetShowLeaderLines (false );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// SetDirection changes the direction of the bar chart (bar or column).
func (_gbb Bar3DChart )SetDirection (d _b .ST_BarDir ){_gbb ._bde .BarDir .ValAttr =d };
2020-08-23 14:15:53 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_gdd LineChartSeries )X ()*_b .CT_LineSer {return _gdd ._fbeg };func (_gfac DataLabels )SetPosition (p _b .ST_DLblPos ){_gfac .ensureChoice ();_gfac ._gaf .Choice .DLblPos =_b .NewCT_DLblPos ();_gfac ._gaf .Choice .DLblPos .ValAttr =p ;};
2021-09-22 16:41:01 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to a bar chart.
func (_cdg BarChart )AddSeries ()BarChartSeries {_da :=_cdg .nextColor (len (_cdg ._ec .Ser ));_ggd :=_b .NewCT_BarSer ();_cdg ._ec .Ser =append (_cdg ._ec .Ser ,_ggd );_ggd .Idx .ValAttr =uint32 (len (_cdg ._ec .Ser )-1);_ggd .Order .ValAttr =uint32 (len (_cdg ._ec .Ser )-1);_ef :=BarChartSeries {_ggd };_ef .InitializeDefaults ();_ef .Properties ().SetSolidFill (_da );return _ef ;};
2021-11-10 11:45:21 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to a Surface chart.
func (_acd SurfaceChart )AddSeries ()SurfaceChartSeries {_fdfd :=_acd .nextColor (len (_acd ._dccgf .Ser ));_eee :=_b .NewCT_SurfaceSer ();_acd ._dccgf .Ser =append (_acd ._dccgf .Ser ,_eee );_eee .Idx .ValAttr =uint32 (len (_acd ._dccgf .Ser )-1);_eee .Order .ValAttr =uint32 (len (_acd ._dccgf .Ser )-1);_gcda :=SurfaceChartSeries {_eee };_gcda .InitializeDefaults ();_gcda .Properties ().LineProperties ().SetSolidFill (_fdfd );return _gcda ;};func (_eaf Marker )SetSymbol (s _b .ST_MarkerStyle ){if s ==_b .ST_MarkerStyleUnset {_eaf ._fffa .Symbol =nil ;}else {_eaf ._fffa .Symbol =_b .NewCT_MarkerStyle ();_eaf ._fffa .Symbol .ValAttr =s ;};};type Title struct{_dbbb *_b .CT_Title };
2021-11-10 11:45:21 +00:00
2022-06-27 19:44:23 +00:00
// SetText sets the series text
func (_gcb SurfaceChartSeries )SetText (s string ){_gcb ._gbca .Tx =_b .NewCT_SerTx ();_gcb ._gbca .Tx .Choice .V =&s ;};type DataLabels struct{_gaf *_b .CT_DLbls };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// SetValues is used to set the source data to a set of values.
func (_fc CategoryAxisDataSource )SetValues (v []string ){_fc ._cab .Choice =_b .NewCT_AxDataSourceChoice ();_fc ._cab .Choice .StrLit =_b .NewCT_StrData ();_fc ._cab .Choice .StrLit .PtCount =_b .NewCT_UnsignedInt ();_fc ._cab .Choice .StrLit .PtCount .ValAttr =uint32 (len (v ));for _efg ,_fbfa :=range v {_fc ._cab .Choice .StrLit .Pt =append (_fc ._cab .Choice .StrLit .Pt ,&_b .CT_StrVal {IdxAttr :uint32 (_efg ),V :_fbfa });};};func (_gag CategoryAxis )MajorGridLines ()GridLines {if _gag ._egd .MajorGridlines ==nil {_gag ._egd .MajorGridlines =_b .NewCT_ChartLines ();};return GridLines {_gag ._egd .MajorGridlines };};
2020-10-12 13:59:12 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_bgdc Pie3DChart )X ()*_b .CT_Pie3DChart {return _bgdc ._caed };func (_afea NumberDataSource )SetReference (s string ){_afea .ensureChoice ();if _afea ._bba .Choice .NumRef ==nil {_afea ._bba .Choice .NumRef =_b .NewCT_NumRef ();};_afea ._bba .Choice .NumRef .F =s ;};
2020-10-12 13:59:12 +00:00
2022-06-27 19:44:23 +00:00
// SetText sets the series text.
func (_cdb AreaChartSeries )SetText (s string ){_cdb ._ge .Tx =_b .NewCT_SerTx ();_cdb ._ge .Tx .Choice .V =&s ;};func (_gdf CategoryAxis )Properties ()_bgd .ShapeProperties {if _gdf ._egd .SpPr ==nil {_gdf ._egd .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_gdf ._egd .SpPr );};func (_fdda DateAxis )Properties ()_bgd .ShapeProperties {if _fdda ._adfg .SpPr ==nil {_fdda ._adfg .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_fdda ._adfg .SpPr );};
2020-10-12 13:59:12 +00:00
2022-06-27 19:44:23 +00:00
// Properties returns the bar chart series shape properties.
func (_ebeg PieChartSeries )Properties ()_bgd .ShapeProperties {if _ebeg ._bfe .SpPr ==nil {_ebeg ._bfe .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_ebeg ._bfe .SpPr );};func MakeSeriesAxis (x *_b .CT_SerAx )SeriesAxis {return SeriesAxis {x }};type CategoryAxis struct{_egd *_b .CT_CatAx };var NullAxis Axis =nullAxis (0);func (_cag SurfaceChartSeries )CategoryAxis ()CategoryAxisDataSource {if _cag ._gbca .Cat ==nil {_cag ._gbca .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_cag ._gbca .Cat );};func (_fecd DataLabels )SetShowSeriesName (b bool ){_fecd .ensureChoice ();_fecd ._gaf .Choice .ShowSerName =_b .NewCT_Boolean ();_fecd ._gaf .Choice .ShowSerName .ValAttr =_bd .Bool (b );};func (_fece DataLabels )ensureChoice (){if _fece ._gaf .Choice ==nil {_fece ._gaf .Choice =_b .NewCT_DLblsChoice ();};};func (_agf SurfaceChart )InitializeDefaults (){_agf ._dccgf .Wireframe =_b .NewCT_Boolean ();_agf ._dccgf .Wireframe .ValAttr =_bd .Bool (false );_agf ._dccgf .BandFmts =_b .NewCT_BandFmts ();for _eedg :=0;_eedg < 15;_eedg ++{_cbde :=_b .NewCT_BandFmt ();_cbde .Idx .ValAttr =uint32 (_eedg );_cbde .SpPr =_c .NewCT_ShapeProperties ();_dfb :=_bgd .MakeShapeProperties (_cbde .SpPr );_dfb .SetSolidFill (_agf .nextColor (_eedg ));_agf ._dccgf .BandFmts .BandFmt =append (_agf ._dccgf .BandFmts .BandFmt ,_cbde );};};func (_dagg chartBase )nextColor (_dcd int )_a .Color {return _dfa [_dcd %len (_dfa )]};
2022-01-15 21:17:38 +00:00
2022-02-25 19:20:45 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_cefd ValueAxis )X ()*_b .CT_ValAx {return _cefd ._eaa };func (_eba Bar3DChart )AddAxis (axis Axis ){_afg :=_b .NewCT_UnsignedInt ();_afg .ValAttr =axis .AxisID ();_eba ._bde .AxId =append (_eba ._bde .AxId ,_afg );};type chartBase struct{};
2022-01-15 21:17:38 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
func (_feae PieChart )InitializeDefaults (){_feae ._aaa .VaryColors =_b .NewCT_Boolean ();_feae ._aaa .VaryColors .ValAttr =_bd .Bool (true );};
2022-01-15 21:17:38 +00:00
2022-06-27 19:44:23 +00:00
// AddArea3DChart adds a new area chart to a chart.
func (_ccb Chart )AddArea3DChart ()Area3DChart {_bf (_ccb ._gbf .Chart );_dg :=_b .NewCT_PlotAreaChoice ();_ccb ._gbf .Chart .PlotArea .Choice =append (_ccb ._gbf .Chart .PlotArea .Choice ,_dg );_dg .Area3DChart =_b .NewCT_Area3DChart ();_cfg :=Area3DChart {_gd :_dg .Area3DChart };_cfg .InitializeDefaults ();return _cfg ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
func (_fea BarChart )InitializeDefaults (){_fea .SetDirection (_b .ST_BarDirCol )};func (_dcda GridLines )Properties ()_bgd .ShapeProperties {if _dcda ._abc .SpPr ==nil {_dcda ._abc .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_dcda ._abc .SpPr );};
2021-05-31 16:22:30 +00:00
2022-06-27 19:44:23 +00:00
// Order returns the order of the series
func (_aeb ScatterChartSeries )Order ()uint32 {return _aeb ._edd .Order .ValAttr };
2020-11-09 01:00:18 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_fd AreaChart )X ()*_b .CT_AreaChart {return _fd ._ea };
2020-11-09 01:00:18 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_cgf Surface3DChart )X ()*_b .CT_Surface3DChart {return _cgf ._fega };
2021-05-31 16:22:30 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
func (_cbc RadarChart )InitializeDefaults (){_cbc ._fbc .RadarStyle .ValAttr =_b .ST_RadarStyleMarker };
2021-07-30 17:03:26 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
func (_cb AreaChart )InitializeDefaults (){};
2017-09-05 20:20:00 -04:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_ebfc Chart )X ()*_b .ChartSpace {return _ebfc ._gbf };func (_cecf ValueAxis )SetPosition (p _b .ST_AxPos ){_cecf ._eaa .AxPos =_b .NewCT_AxPos ();_cecf ._eaa .AxPos .ValAttr =p ;};
2017-09-07 12:08:13 -04:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_geff DoughnutChart )X ()*_b .CT_DoughnutChart {return _geff ._cbd };
2017-09-07 12:08:13 -04:00
2022-06-27 19:44:23 +00:00
// AddAxis adds an axis to a line chart.
func (_bbed LineChart )AddAxis (axis Axis ){_afgd :=_b .NewCT_UnsignedInt ();_afgd .ValAttr =axis .AxisID ();_bbed ._ebae .AxId =append (_bbed ._ebae .AxId ,_afgd );};func (_gge DateAxis )SetCrosses (axis Axis ){_gge ._adfg .CrossAx .ValAttr =axis .AxisID ()};
2021-06-16 07:10:52 +00:00
2022-06-27 19:44:23 +00:00
// AddBarChart adds a new bar chart to a chart.
func (_bb Chart )AddBarChart ()BarChart {_bdea :=_b .NewCT_PlotAreaChoice ();_bb ._gbf .Chart .PlotArea .Choice =append (_bb ._gbf .Chart .PlotArea .Choice ,_bdea );_bdea .BarChart =_b .NewCT_BarChart ();_bdea .BarChart .Grouping =_b .NewCT_BarGrouping ();_bdea .BarChart .Grouping .ValAttr =_b .ST_BarGroupingStandard ;_ffg :=BarChart {_ec :_bdea .BarChart };_ffg .InitializeDefaults ();return _ffg ;};
2017-09-06 17:02:21 -04:00
2022-06-27 19:44:23 +00:00
// AddDoughnutChart adds a new doughnut (pie with a hole in the center) chart to a chart.
func (_adf Chart )AddDoughnutChart ()DoughnutChart {_bgc :=_b .NewCT_PlotAreaChoice ();_adf ._gbf .Chart .PlotArea .Choice =append (_adf ._gbf .Chart .PlotArea .Choice ,_bgc );_bgc .DoughnutChart =_b .NewCT_DoughnutChart ();_bfg :=DoughnutChart {_cbd :_bgc .DoughnutChart };_bfg .InitializeDefaults ();return _bfg ;};func MakeDataLabels (x *_b .CT_DLbls )DataLabels {return DataLabels {x }};
// Properties returns the bar chart series shape properties.
func (_dcf AreaChartSeries )Properties ()_bgd .ShapeProperties {if _dcf ._ge .SpPr ==nil {_dcf ._ge .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_dcf ._ge .SpPr );};
2020-08-23 14:15:53 +00:00
2022-02-25 19:20:45 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_fa AreaChartSeries )X ()*_b .CT_AreaSer {return _fa ._ge };func (_faf LineChartSeries )Values ()NumberDataSource {if _faf ._fbeg .Val ==nil {_faf ._fbeg .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_faf ._fbeg .Val );};
2017-09-06 17:33:34 -04:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults initializes an area series to the default values.
func (_cd AreaChartSeries )InitializeDefaults (){};
2021-03-16 20:51:18 +00:00
2022-02-25 19:20:45 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_dea ScatterChartSeries )X ()*_b .CT_ScatterSer {return _dea ._edd };
2017-09-06 17:33:34 -04:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
func (_eeb BubbleChartSeries )Values ()NumberDataSource {if _eeb ._aff .YVal ==nil {_eeb ._aff .YVal =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_eeb ._aff .YVal );};
2017-09-06 17:36:49 -04:00
2022-06-27 19:44:23 +00:00
// AddRadarChart adds a new radar chart to a chart.
func (_gbd Chart )AddRadarChart ()RadarChart {_ed :=_b .NewCT_PlotAreaChoice ();_gbd ._gbf .Chart .PlotArea .Choice =append (_gbd ._gbf .Chart .PlotArea .Choice ,_ed );_ed .RadarChart =_b .NewCT_RadarChart ();_gda :=RadarChart {_fbc :_ed .RadarChart };_gda .InitializeDefaults ();return _gda ;};
// AddAxis adds an axis to a Surface chart.
func (_cgfe SurfaceChart )AddAxis (axis Axis ){_dcdc :=_b .NewCT_UnsignedInt ();_dcdc .ValAttr =axis .AxisID ();_cgfe ._dccgf .AxId =append (_cgfe ._dccgf .AxId ,_dcdc );};
2021-01-04 16:11:39 +00:00
2022-01-15 21:17:38 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_fdag Line3DChart )X ()*_b .CT_Line3DChart {return _fdag ._adg };
2022-02-25 19:20:45 +00:00
2022-06-27 19:44:23 +00:00
// PieOfPieChart is a Pie chart with an extra Pie chart.
type PieOfPieChart struct{chartBase ;_acc *_b .CT_OfPieChart ;};func (_geaa SeriesAxis )AxisID ()uint32 {return _geaa ._dbc .AxId .ValAttr };func (_de BubbleChart )AddAxis (axis Axis ){_fda :=_b .NewCT_UnsignedInt ();_fda .ValAttr =axis .AxisID ();_de ._ebf .AxId =append (_de ._ebf .AxId ,_fda );};type ScatterChart struct{chartBase ;_cg *_b .CT_ScatterChart ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_abdg Legend )X ()*_b .CT_Legend {return _abdg ._gedd };
2022-01-15 21:17:38 +00:00
2022-06-27 19:44:23 +00:00
// PieChart is a Pie chart.
type PieChart struct{chartBase ;_aaa *_b .CT_PieChart ;};func (_efb Chart )AddSeriesAxis ()SeriesAxis {_eed :=_b .NewCT_SerAx ();if _efb ._gbf .Chart .PlotArea .CChoice ==nil {_efb ._gbf .Chart .PlotArea .CChoice =_b .NewCT_PlotAreaChoice1 ();};_eed .AxId =_b .NewCT_UnsignedInt ();_eed .AxId .ValAttr =0x7FFFFFFF&_bg .Uint32 ();_efb ._gbf .Chart .PlotArea .CChoice .SerAx =append (_efb ._gbf .Chart .PlotArea .CChoice .SerAx ,_eed );_eed .Delete =_b .NewCT_Boolean ();_eed .Delete .ValAttr =_bd .Bool (false );_beec :=MakeSeriesAxis (_eed );_beec .InitializeDefaults ();return _beec ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults initializes an Radar series to the default values.
func (_aeeb RadarChartSeries )InitializeDefaults (){};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults initializes a bar chart series to the default values.
func (_ca BarChartSeries )InitializeDefaults (){};
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// AddAxis adds an axis to a Scatter chart.
func (_fcec ScatterChart )AddAxis (axis Axis ){_bgef :=_b .NewCT_UnsignedInt ();_bgef .ValAttr =axis .AxisID ();_fcec ._cg .AxId =append (_fcec ._cg .AxId ,_bgef );};func (_gfd DateAxis )SetTickLabelPosition (p _b .ST_TickLblPos ){if p ==_b .ST_TickLblPosUnset {_gfd ._adfg .TickLblPos =nil ;}else {_gfd ._adfg .TickLblPos =_b .NewCT_TickLblPos ();_gfd ._adfg .TickLblPos .ValAttr =p ;};};type LineChart struct{chartBase ;_ebae *_b .CT_LineChart ;};type SeriesAxis struct{_dbc *_b .CT_SerAx };
2022-06-27 19:44:23 +00:00
// InitializeDefaults the Stock chart to its defaults
func (_gbg StockChart )InitializeDefaults (){_gbg ._bdd .HiLowLines =_b .NewCT_ChartLines ();_gbg ._bdd .UpDownBars =_b .NewCT_UpDownBars ();_gbg ._bdd .UpDownBars .GapWidth =_b .NewCT_GapAmount ();_gbg ._bdd .UpDownBars .GapWidth .ValAttr =&_b .ST_GapAmount {};_gbg ._bdd .UpDownBars .GapWidth .ValAttr .ST_GapAmountUShort =_bd .Uint16 (150);_gbg ._bdd .UpDownBars .UpBars =_b .NewCT_UpDownBar ();_gbg ._bdd .UpDownBars .DownBars =_b .NewCT_UpDownBar ();};
2021-04-23 20:00:00 +00:00
2022-06-27 19:44:23 +00:00
// RadarChart is an Radar chart that has a shaded Radar underneath a curve.
type RadarChart struct{chartBase ;_fbc *_b .CT_RadarChart ;};func (_efeb Legend )Properties ()_bgd .ShapeProperties {if _efeb ._gedd .SpPr ==nil {_efeb ._gedd .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_efeb ._gedd .SpPr );};
2022-04-09 14:27:46 +00:00
2022-06-27 19:44:23 +00:00
// AddScatterChart adds a scatter (X/Y) chart.
func (_bee Chart )AddScatterChart ()ScatterChart {_ebd :=_b .NewCT_PlotAreaChoice ();_bee ._gbf .Chart .PlotArea .Choice =append (_bee ._gbf .Chart .PlotArea .Choice ,_ebd );_ebd .ScatterChart =_b .NewCT_ScatterChart ();_cad :=ScatterChart {_cg :_ebd .ScatterChart };_cad .InitializeDefaults ();return _cad ;};func (_ead Legend )InitializeDefaults (){_ead .SetPosition (_b .ST_LegendPosR );_ead .SetOverlay (false );_ead .Properties ().SetNoFill ();_ead .Properties ().LineProperties ().SetNoFill ();};type Line3DChart struct{chartBase ;_adg *_b .CT_Line3DChart ;};type Marker struct{_fffa *_b .CT_Marker };func (_bgf SurfaceChartSeries )Values ()NumberDataSource {if _bgf ._gbca .Val ==nil {_bgf ._gbca .Val =_b .NewCT_NumDataSource ();};_bcb :=MakeNumberDataSource (_bgf ._gbca .Val );_bcb .CreateEmptyNumberCache ();return _bcb ;};
// Marker returns the marker properties.
func (_ffbc ScatterChartSeries )Marker ()Marker {if _ffbc ._edd .Marker ==nil {_ffbc ._edd .Marker =_b .NewCT_Marker ();};return MakeMarker (_ffbc ._edd .Marker );};func (_gef BarChart )AddAxis (axis Axis ){_ga :=_b .NewCT_UnsignedInt ();_ga .ValAttr =axis .AxisID ();_gef ._ec .AxId =append (_gef ._ec .AxId ,_ga );};func (_eggf CategoryAxis )AxisID ()uint32 {return _eggf ._egd .AxId .ValAttr };func (_eged ValueAxis )MajorGridLines ()GridLines {if _eged ._eaa .MajorGridlines ==nil {_eged ._eaa .MajorGridlines =_b .NewCT_ChartLines ();};return GridLines {_eged ._eaa .MajorGridlines };};
// Properties returns the bar chart series shape properties.
func (_gbe BarChartSeries )Properties ()_bgd .ShapeProperties {if _gbe ._ff .SpPr ==nil {_gbe ._ff .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_gbe ._ff .SpPr );};
2020-08-23 14:15:53 +00:00
2022-02-25 19:20:45 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_bce SurfaceChartSeries )X ()*_b .CT_SurfaceSer {return _bce ._gbca };func (_fbf CategoryAxis )SetTickLabelPosition (p _b .ST_TickLblPos ){if p ==_b .ST_TickLblPosUnset {_fbf ._egd .TickLblPos =nil ;}else {_fbf ._egd .TickLblPos =_b .NewCT_TickLblPos ();_fbf ._egd .TickLblPos .ValAttr =p ;};};
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to a Surface chart.
func (_aegg Surface3DChart )AddSeries ()SurfaceChartSeries {_bga :=_aegg .nextColor (len (_aegg ._fega .Ser ));_dbbgd :=_b .NewCT_SurfaceSer ();_aegg ._fega .Ser =append (_aegg ._fega .Ser ,_dbbgd );_dbbgd .Idx .ValAttr =uint32 (len (_aegg ._fega .Ser )-1);_dbbgd .Order .ValAttr =uint32 (len (_aegg ._fega .Ser )-1);_dcdaf :=SurfaceChartSeries {_dbbgd };_dcdaf .InitializeDefaults ();_dcdaf .Properties ().LineProperties ().SetSolidFill (_bga );return _dcdaf ;};
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// SetOrder sets the order of the series
func (_adfc SurfaceChartSeries )SetOrder (idx uint32 ){_adfc ._gbca .Order .ValAttr =idx };
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
func (_bbec DoughnutChart )InitializeDefaults (){_bbec ._cbd .VaryColors =_b .NewCT_Boolean ();_bbec ._cbd .VaryColors .ValAttr =_bd .Bool (true );_bbec ._cbd .HoleSize =_b .NewCT_HoleSize ();_bbec ._cbd .HoleSize .ValAttr =&_b .ST_HoleSize {};_bbec ._cbd .HoleSize .ValAttr .ST_HoleSizeUByte =_bd .Uint8 (50);};type DateAxis struct{_adfg *_b .CT_DateAx };func (_eebb DateAxis )MajorGridLines ()GridLines {if _eebb ._adfg .MajorGridlines ==nil {_eebb ._adfg .MajorGridlines =_b .NewCT_ChartLines ();};return GridLines {_eebb ._adfg .MajorGridlines };};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// Values returns the bubble size data source.
func (_fdb BubbleChartSeries )BubbleSizes ()NumberDataSource {if _fdb ._aff .BubbleSize ==nil {_fdb ._aff .BubbleSize =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_fdb ._aff .BubbleSize );};
// AddAreaChart adds a new area chart to a chart.
func (_ged Chart )AddAreaChart ()AreaChart {_ced :=_b .NewCT_PlotAreaChoice ();_ged ._gbf .Chart .PlotArea .Choice =append (_ged ._gbf .Chart .PlotArea .Choice ,_ced );_ced .AreaChart =_b .NewCT_AreaChart ();_gfa :=AreaChart {_ea :_ced .AreaChart };_gfa .InitializeDefaults ();return _gfa ;};
2020-08-23 14:15:53 +00:00
2022-04-09 14:27:46 +00:00
// SetText sets the series text.
2022-06-27 19:44:23 +00:00
func (_be BubbleChartSeries )SetText (s string ){_be ._aff .Tx =_b .NewCT_SerTx ();_be ._aff .Tx .Choice .V =&s ;};
2022-06-27 19:44:23 +00:00
// Properties returns the chart's shape properties.
func (_dec Chart )Properties ()_bgd .ShapeProperties {if _dec ._gbf .SpPr ==nil {_dec ._gbf .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_dec ._gbf .SpPr );};
2022-04-09 14:27:46 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to an area chart.
func (_ee AreaChart )AddSeries ()AreaChartSeries {_gf :=_ee .nextColor (len (_ee ._ea .Ser ));_gb :=_b .NewCT_AreaSer ();_ee ._ea .Ser =append (_ee ._ea .Ser ,_gb );_gb .Idx .ValAttr =uint32 (len (_ee ._ea .Ser )-1);_gb .Order .ValAttr =uint32 (len (_ee ._ea .Ser )-1);_egg :=AreaChartSeries {_gb };_egg .InitializeDefaults ();_egg .Properties ().SetSolidFill (_gf );return _egg ;};type nullAxis byte ;
2021-09-22 16:41:01 +00:00
2022-06-27 19:44:23 +00:00
// SetText sets the series text.
func (_adbc PieChartSeries )SetText (s string ){_adbc ._bfe .Tx =_b .NewCT_SerTx ();_adbc ._bfe .Tx .Choice .V =&s ;};
2021-04-23 20:00:00 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to a Bubble chart.
func (_cc BubbleChart )AddSeries ()BubbleChartSeries {_fg :=_cc .nextColor (len (_cc ._ebf .Ser ));_fdf :=_b .NewCT_BubbleSer ();_cc ._ebf .Ser =append (_cc ._ebf .Ser ,_fdf );_fdf .Idx .ValAttr =uint32 (len (_cc ._ebf .Ser )-1);_fdf .Order .ValAttr =uint32 (len (_cc ._ebf .Ser )-1);_ae :=BubbleChartSeries {_fdf };_ae .InitializeDefaults ();_ae .Properties ().SetSolidFill (_fg );return _ae ;};
// SetNumberReference is used to set the source data to a range of cells containing
// numbers.
func (_fab CategoryAxisDataSource )SetNumberReference (s string ){_fab ._cab .Choice =_b .NewCT_AxDataSourceChoice ();_fab ._cab .Choice .NumRef =_b .NewCT_NumRef ();_fab ._cab .Choice .NumRef .F =s ;};func (_fb AreaChart )AddAxis (axis Axis ){_eb :=_b .NewCT_UnsignedInt ();_eb .ValAttr =axis .AxisID ();_fb ._ea .AxId =append (_fb ._ea .AxId ,_eb );};
2021-01-04 16:11:39 +00:00
2022-04-09 14:27:46 +00:00
// AddSeries adds a default series to a line chart.
2022-06-27 19:44:23 +00:00
func (_fad LineChart )AddSeries ()LineChartSeries {_fdbf :=_fad .nextColor (len (_fad ._ebae .Ser ));_gfc :=_b .NewCT_LineSer ();_fad ._ebae .Ser =append (_fad ._ebae .Ser ,_gfc );_gfc .Idx .ValAttr =uint32 (len (_fad ._ebae .Ser )-1);_gfc .Order .ValAttr =uint32 (len (_fad ._ebae .Ser )-1);_cef :=LineChartSeries {_gfc };_cef .InitializeDefaults ();_cef .Properties ().LineProperties ().SetSolidFill (_fdbf );return _cef ;};
2021-01-04 16:11:39 +00:00
2022-06-27 19:44:23 +00:00
// AddSurfaceChart adds a new surface chart to a chart.
func (_gdff Chart )AddSurfaceChart ()SurfaceChart {_gdc :=_b .NewCT_PlotAreaChoice ();_gdff ._gbf .Chart .PlotArea .Choice =append (_gdff ._gbf .Chart .PlotArea .Choice ,_gdc );_gdc .SurfaceChart =_b .NewCT_SurfaceChart ();_bf (_gdff ._gbf .Chart );_gdff ._gbf .Chart .View3D .RotX .ValAttr =_bd .Int8 (90);_gdff ._gbf .Chart .View3D .RotY .ValAttr =_bd .Uint16 (0);_gdff ._gbf .Chart .View3D .Perspective =_b .NewCT_Perspective ();_gdff ._gbf .Chart .View3D .Perspective .ValAttr =_bd .Uint8 (0);_beg :=SurfaceChart {_dccgf :_gdc .SurfaceChart };_beg .InitializeDefaults ();return _beg ;};
2021-04-23 20:00:00 +00:00
2022-06-27 19:44:23 +00:00
// SetIndex sets the index of the series
func (_bfb SurfaceChartSeries )SetIndex (idx uint32 ){_bfb ._gbca .Idx .ValAttr =idx };
2022-04-09 14:27:46 +00:00
2022-06-27 19:44:23 +00:00
// AddAxis adds an axis to a Surface chart.
func (_gdba Surface3DChart )AddAxis (axis Axis ){_bda :=_b .NewCT_UnsignedInt ();_bda .ValAttr =axis .AxisID ();_gdba ._fega .AxId =append (_gdba ._fega .AxId ,_bda );};func (_fgbf DateAxis )AxisID ()uint32 {return _fgbf ._adfg .AxId .ValAttr };
2022-06-27 19:44:23 +00:00
// SetIndex sets the index of the series
func (_faa LineChartSeries )SetIndex (idx uint32 ){_faa ._fbeg .Idx .ValAttr =idx };
2021-08-23 20:44:48 +00:00
2022-06-27 19:44:23 +00:00
// Chart is a generic chart.
type Chart struct{_gbf *_b .ChartSpace };func (_dcc CategoryAxis )SetCrosses (axis Axis ){_dcc ._egd .Choice =_b .NewEG_AxSharedChoice ();_dcc ._egd .Choice .Crosses =_b .NewCT_Crosses ();_dcc ._egd .Choice .Crosses .ValAttr =_b .ST_CrossesAutoZero ;_dcc ._egd .CrossAx .ValAttr =axis .AxisID ();};
2021-08-23 20:44:48 +00:00
2022-06-27 19:44:23 +00:00
// SetOrder sets the order of the series
func (_aca ScatterChartSeries )SetOrder (idx uint32 ){_aca ._edd .Order .ValAttr =idx };
2022-06-27 19:44:23 +00:00
// CategoryAxis returns the category data source.
func (_gcc RadarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gcc ._agd .Cat ==nil {_gcc ._agd .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_gcc ._agd .Cat );};func MakeTitle (x *_b .CT_Title )Title {return Title {x }};
2022-06-27 19:44:23 +00:00
// SetOrder sets the order of the series
func (_gec LineChartSeries )SetOrder (idx uint32 ){_gec ._fbeg .Order .ValAttr =idx };func _bf (_dac *_b .CT_Chart ){_dac .View3D =_b .NewCT_View3D ();_dac .View3D .RotX =_b .NewCT_RotX ();_dac .View3D .RotX .ValAttr =_bd .Int8 (15);_dac .View3D .RotY =_b .NewCT_RotY ();_dac .View3D .RotY .ValAttr =_bd .Uint16 (20);_dac .View3D .RAngAx =_b .NewCT_Boolean ();_dac .View3D .RAngAx .ValAttr =_bd .Bool (false );_dac .Floor =_b .NewCT_Surface ();_dac .Floor .Thickness =_b .NewCT_Thickness ();_dac .Floor .Thickness .ValAttr .Uint32 =_bd .Uint32 (0);_dac .SideWall =_b .NewCT_Surface ();_dac .SideWall .Thickness =_b .NewCT_Thickness ();_dac .SideWall .Thickness .ValAttr .Uint32 =_bd .Uint32 (0);_dac .BackWall =_b .NewCT_Surface ();_dac .BackWall .Thickness =_b .NewCT_Thickness ();_dac .BackWall .Thickness .ValAttr .Uint32 =_bd .Uint32 (0);};
2022-04-09 14:27:46 +00:00
2022-06-27 19:44:23 +00:00
// SetDirection changes the direction of the bar chart (bar or column).
func (_agec BarChart )SetDirection (d _b .ST_BarDir ){_agec ._ec .BarDir .ValAttr =d };
2022-02-25 19:20:45 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_afa StockChart )X ()*_b .CT_StockChart {return _afa ._bdd };func (_egec NumberDataSource )ensureChoice (){if _egec ._bba .Choice ==nil {_egec ._bba .Choice =_b .NewCT_NumDataSourceChoice ();};};func (_adgb SurfaceChartSeries )InitializeDefaults (){_adgb .Properties ().LineProperties ().SetWidth (1*_d .Point );_adgb .Properties ().LineProperties ().SetSolidFill (_a .Black );_adgb .Properties ().LineProperties ().SetJoin (_bgd .LineJoinRound );};func (_cga Title )SetText (s string ){if _cga ._dbbb .Tx ==nil {_cga ._dbbb .Tx =_b .NewCT_Tx ();};if _cga ._dbbb .Tx .Choice .Rich ==nil {_cga ._dbbb .Tx .Choice .Rich =_c .NewCT_TextBody ();};var _dbgg *_c .CT_TextParagraph ;if len (_cga ._dbbb .Tx .Choice .Rich .P )==0{_dbgg =_c .NewCT_TextParagraph ();_cga ._dbbb .Tx .Choice .Rich .P =[]*_c .CT_TextParagraph {_dbgg };}else {_dbgg =_cga ._dbbb .Tx .Choice .Rich .P [0];};var _bgdff *_c .EG_TextRun ;if len (_dbgg .EG_TextRun )==0{_bgdff =_c .NewEG_TextRun ();_dbgg .EG_TextRun =[]*_c .EG_TextRun {_bgdff };}else {_bgdff =_dbgg .EG_TextRun [0];};if _bgdff .R ==nil {_bgdff .R =_c .NewCT_RegularTextRun ();};_bgdff .R .T =s ;};
2021-07-30 17:03:26 +00:00
2022-06-27 19:44:23 +00:00
// Labels returns the data label properties.
func (_ada LineChartSeries )Labels ()DataLabels {if _ada ._fbeg .DLbls ==nil {_ada ._fbeg .DLbls =_b .NewCT_DLbls ();};return MakeDataLabels (_ada ._fbeg .DLbls );};func (_bgee ScatterChartSeries )CategoryAxis ()CategoryAxisDataSource {if _bgee ._edd .XVal ==nil {_bgee ._edd .XVal =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_bgee ._edd .XVal );};
2020-10-12 13:59:12 +00:00
2022-06-27 19:44:23 +00:00
// Area3DChart is an area chart that has a shaded area underneath a curve.
type Area3DChart struct{chartBase ;_gd *_b .CT_Area3DChart ;};
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// Axis is the interface implemented by different axes when assigning to a
// chart.
type Axis interface{AxisID ()uint32 ;};
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to a Scatter chart.
func (_bdeb ScatterChart )AddSeries ()ScatterChartSeries {_aad :=_bdeb .nextColor (len (_bdeb ._cg .Ser ));_cgd :=_b .NewCT_ScatterSer ();_bdeb ._cg .Ser =append (_bdeb ._cg .Ser ,_cgd );_cgd .Idx .ValAttr =uint32 (len (_bdeb ._cg .Ser )-1);_cgd .Order .ValAttr =uint32 (len (_bdeb ._cg .Ser )-1);_gad :=ScatterChartSeries {_cgd };_gad .InitializeDefaults ();_gad .Marker ().Properties ().LineProperties ().SetSolidFill (_aad );_gad .Marker ().Properties ().SetSolidFill (_aad );return _gad ;};
2021-08-23 20:44:48 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_df BarChart )X ()*_b .CT_BarChart {return _df ._ec };
2021-08-23 20:44:48 +00:00
2022-06-27 19:44:23 +00:00
// Properties returns the line chart series shape properties.
func (_aagb ScatterChartSeries )Properties ()_bgd .ShapeProperties {if _aagb ._edd .SpPr ==nil {_aagb ._edd .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_aagb ._edd .SpPr );};
2022-06-27 19:44:23 +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 (_ecf NumberDataSource )CreateEmptyNumberCache (){_ecf .ensureChoice ();if _ecf ._bba .Choice .NumRef ==nil {_ecf ._bba .Choice .NumRef =_b .NewCT_NumRef ();};_ecf ._bba .Choice .NumLit =nil ;_ecf ._bba .Choice .NumRef .NumCache =_b .NewCT_NumData ();_ecf ._bba .Choice .NumRef .NumCache .PtCount =_b .NewCT_UnsignedInt ();_ecf ._bba .Choice .NumRef .NumCache .PtCount .ValAttr =0;};
2022-04-09 14:27:46 +00:00
// InitializeDefaults the bar chart to its defaults
2022-06-27 19:44:23 +00:00
func (_ac Bar3DChart )InitializeDefaults (){_ac .SetDirection (_b .ST_BarDirCol )};
2021-06-16 07:10:52 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to an area chart.
func (_e Area3DChart )AddSeries ()AreaChartSeries {_ag :=_e .nextColor (len (_e ._gd .Ser ));_bgdf :=_b .NewCT_AreaSer ();_e ._gd .Ser =append (_e ._gd .Ser ,_bgdf );_bgdf .Idx .ValAttr =uint32 (len (_e ._gd .Ser )-1);_bgdf .Order .ValAttr =uint32 (len (_e ._gd .Ser )-1);_ad :=AreaChartSeries {_bgdf };_ad .InitializeDefaults ();_ad .Properties ().SetSolidFill (_ag );return _ad ;};func (_fdc nullAxis )AxisID ()uint32 {return 0};
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
func (_agc Pie3DChart )InitializeDefaults (){_agc ._caed .VaryColors =_b .NewCT_Boolean ();_agc ._caed .VaryColors .ValAttr =_bd .Bool (true );};
// Index returns the index of the series
func (_cgg ScatterChartSeries )Index ()uint32 {return _cgg ._edd .Idx .ValAttr };func (_adfd ValueAxis )SetCrosses (axis Axis ){_adfd ._eaa .CrossAx .ValAttr =axis .AxisID ()};
2021-09-22 16:41:01 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_ebg RadarChart )X ()*_b .CT_RadarChart {return _ebg ._fbc };
2021-05-31 16:22:30 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to an Radar chart.
func (_bbb RadarChart )AddSeries ()RadarChartSeries {_gbfa :=_bbb .nextColor (len (_bbb ._fbc .Ser ));_ggb :=_b .NewCT_RadarSer ();_bbb ._fbc .Ser =append (_bbb ._fbc .Ser ,_ggb );_ggb .Idx .ValAttr =uint32 (len (_bbb ._fbc .Ser )-1);_ggb .Order .ValAttr =uint32 (len (_bbb ._fbc .Ser )-1);_accc :=RadarChartSeries {_ggb };_accc .InitializeDefaults ();_accc .Properties ().SetSolidFill (_gbfa );return _accc ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// Surface3DChart is a 3D view of a surface chart.
type Surface3DChart struct{chartBase ;_fega *_b .CT_Surface3DChart ;};func (_def ValueAxis )Properties ()_bgd .ShapeProperties {if _def ._eaa .SpPr ==nil {_def ._eaa .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_def ._eaa .SpPr );};func MakeLegend (l *_b .CT_Legend )Legend {return Legend {l }};func (_bfgc ScatterChartSeries )SetSmooth (b bool ){_bfgc ._edd .Smooth =_b .NewCT_Boolean ();_bfgc ._edd .Smooth .ValAttr =&b ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// PieChartSeries is a series to be used on an Pie chart.
type PieChartSeries struct{_bfe *_b .CT_PieSer };
2021-08-23 20:44:48 +00:00
2022-06-27 19:44:23 +00:00
// AddValueAxis adds a value axis to the chart.
func (_db Chart )AddValueAxis ()ValueAxis {_eec :=_b .NewCT_ValAx ();if _db ._gbf .Chart .PlotArea .CChoice ==nil {_db ._gbf .Chart .PlotArea .CChoice =_b .NewCT_PlotAreaChoice1 ();};_eec .AxId =_b .NewCT_UnsignedInt ();_eec .AxId .ValAttr =0x7FFFFFFF&_bg .Uint32 ();_db ._gbf .Chart .PlotArea .CChoice .ValAx =append (_db ._gbf .Chart .PlotArea .CChoice .ValAx ,_eec );_eec .Delete =_b .NewCT_Boolean ();_eec .Delete .ValAttr =_bd .Bool (false );_eec .Scaling =_b .NewCT_Scaling ();_eec .Scaling .Orientation =_b .NewCT_Orientation ();_eec .Scaling .Orientation .ValAttr =_b .ST_OrientationMinMax ;_eec .Choice =&_b .EG_AxSharedChoice {};_eec .Choice .Crosses =_b .NewCT_Crosses ();_eec .Choice .Crosses .ValAttr =_b .ST_CrossesAutoZero ;_eec .CrossBetween =_b .NewCT_CrossBetween ();_eec .CrossBetween .ValAttr =_b .ST_CrossBetweenBetween ;_aed :=MakeValueAxis (_eec );_aed .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_a .LightGray );_aed .SetMajorTickMark (_b .ST_TickMarkOut );_aed .SetMinorTickMark (_b .ST_TickMarkIn );_aed .SetTickLabelPosition (_b .ST_TickLblPosNextTo );_aed .Properties ().LineProperties ().SetSolidFill (_a .Black );_aed .SetPosition (_b .ST_AxPosL );return _aed ;};func (_cfa Legend )SetOverlay (b bool ){_cfa ._gedd .Overlay =_b .NewCT_Boolean ();_cfa ._gedd .Overlay .ValAttr =_bd .Bool (b );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// CategoryAxis returns the category data source.
func (_afe BubbleChartSeries )CategoryAxis ()CategoryAxisDataSource {if _afe ._aff .XVal ==nil {_afe ._aff .XVal =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_afe ._aff .XVal );};
2020-11-09 01:00:18 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_egga PieChart )X ()*_b .CT_PieChart {return _egga ._aaa };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddDateAxis adds a value axis to the chart.
func (_efe Chart )AddDateAxis ()DateAxis {_fec :=_b .NewCT_DateAx ();if _efe ._gbf .Chart .PlotArea .CChoice ==nil {_efe ._gbf .Chart .PlotArea .CChoice =_b .NewCT_PlotAreaChoice1 ();};_fec .AxId =_b .NewCT_UnsignedInt ();_fec .AxId .ValAttr =0x7FFFFFFF&_bg .Uint32 ();_efe ._gbf .Chart .PlotArea .CChoice .DateAx =append (_efe ._gbf .Chart .PlotArea .CChoice .DateAx ,_fec );_fec .Delete =_b .NewCT_Boolean ();_fec .Delete .ValAttr =_bd .Bool (false );_fec .Scaling =_b .NewCT_Scaling ();_fec .Scaling .Orientation =_b .NewCT_Orientation ();_fec .Scaling .Orientation .ValAttr =_b .ST_OrientationMinMax ;_fec .Choice =&_b .EG_AxSharedChoice {};_fec .Choice .Crosses =_b .NewCT_Crosses ();_fec .Choice .Crosses .ValAttr =_b .ST_CrossesAutoZero ;_adb :=DateAxis {_fec };_adb .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_a .LightGray );_adb .SetMajorTickMark (_b .ST_TickMarkOut );_adb .SetMinorTickMark (_b .ST_TickMarkIn );_adb .SetTickLabelPosition (_b .ST_TickLblPosNextTo );_adb .Properties ().LineProperties ().SetSolidFill (_a .Black );_adb .SetPosition (_b .ST_AxPosL );return _adb ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AreaChart is an area chart that has a shaded area underneath a curve.
type AreaChart struct{chartBase ;_ea *_b .CT_AreaChart ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to an Pie3D chart.
func (_cdd Pie3DChart )AddSeries ()PieChartSeries {_ffda :=_b .NewCT_PieSer ();_cdd ._caed .Ser =append (_cdd ._caed .Ser ,_ffda );_ffda .Idx .ValAttr =uint32 (len (_cdd ._caed .Ser )-1);_ffda .Order .ValAttr =uint32 (len (_cdd ._caed .Ser )-1);_caef :=PieChartSeries {_ffda };_caef .InitializeDefaults ();return _caef ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
func (_gfcf RadarChartSeries )Values ()NumberDataSource {if _gfcf ._agd .Val ==nil {_gfcf ._agd .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_gfcf ._agd .Val );};
2022-01-15 21:17:38 +00:00
2022-06-27 19:44:23 +00:00
// StockChart is a 2D Stock chart.
type StockChart struct{chartBase ;_bdd *_b .CT_StockChart ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to an Doughnut chart.
func (_edf DoughnutChart )AddSeries ()PieChartSeries {_bad :=_b .NewCT_PieSer ();_edf ._cbd .Ser =append (_edf ._cbd .Ser ,_bad );_bad .Idx .ValAttr =uint32 (len (_edf ._cbd .Ser )-1);_bad .Order .ValAttr =uint32 (len (_edf ._cbd .Ser )-1);_cbe :=PieChartSeries {_bad };_cbe .InitializeDefaults ();return _cbe ;};
2021-03-16 20:51:18 +00:00
2022-06-27 19:44:23 +00:00
// AddPieChart adds a new pie chart to a chart.
func (_gc Chart )AddPieChart ()PieChart {_bag :=_b .NewCT_PlotAreaChoice ();_gc ._gbf .Chart .PlotArea .Choice =append (_gc ._gbf .Chart .PlotArea .Choice ,_bag );_bag .PieChart =_b .NewCT_PieChart ();_ecde :=PieChart {_aaa :_bag .PieChart };_ecde .InitializeDefaults ();return _ecde ;};func (_fcd RadarChart )AddAxis (axis Axis ){_caag :=_b .NewCT_UnsignedInt ();_caag .ValAttr =axis .AxisID ();_fcd ._fbc .AxId =append (_fcd ._fbc .AxId ,_caag );};func MakeCategoryAxis (x *_b .CT_CatAx )CategoryAxis {return CategoryAxis {x }};
2020-11-09 01:00:18 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
func (_dc Area3DChart )InitializeDefaults (){};
2021-08-23 20:44:48 +00:00
2022-06-27 19:44:23 +00:00
// AddPie3DChart adds a new pie chart to a chart.
func (_geda Chart )AddPie3DChart ()Pie3DChart {_bf (_geda ._gbf .Chart );_bbc :=_b .NewCT_PlotAreaChoice ();_geda ._gbf .Chart .PlotArea .Choice =append (_geda ._gbf .Chart .PlotArea .Choice ,_bbc );_bbc .Pie3DChart =_b .NewCT_Pie3DChart ();_dgb :=Pie3DChart {_caed :_bbc .Pie3DChart };_dgb .InitializeDefaults ();return _dgb ;};type Legend struct{_gedd *_b .CT_Legend };
2020-11-09 01:00:18 +00:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
func (_eaea BarChartSeries )Values ()NumberDataSource {if _eaea ._ff .Val ==nil {_eaea ._ff .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_eaea ._ff .Val );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to an Pie chart.
func (_dgg PieOfPieChart )AddSeries ()PieChartSeries {_fdff :=_b .NewCT_PieSer ();_dgg ._acc .Ser =append (_dgg ._acc .Ser ,_fdff );_fdff .Idx .ValAttr =uint32 (len (_dgg ._acc .Ser )-1);_fdff .Order .ValAttr =uint32 (len (_dgg ._acc .Ser )-1);_fac :=PieChartSeries {_fdff };_fac .InitializeDefaults ();return _fac ;};
2021-04-23 20:00:00 +00:00
2022-06-27 19:44:23 +00:00
// AddLine3DChart adds a new 3D line chart to a chart.
func (_abd Chart )AddLine3DChart ()Line3DChart {_bf (_abd ._gbf .Chart );_cabf :=_b .NewCT_PlotAreaChoice ();_abd ._gbf .Chart .PlotArea .Choice =append (_abd ._gbf .Chart .PlotArea .Choice ,_cabf );_cabf .Line3DChart =_b .NewCT_Line3DChart ();_cabf .Line3DChart .Grouping =_b .NewCT_Grouping ();_cabf .Line3DChart .Grouping .ValAttr =_b .ST_GroupingStandard ;return Line3DChart {_adg :_cabf .Line3DChart };};func (_fecb DataLabels )SetShowLeaderLines (b bool ){_fecb .ensureChoice ();_fecb ._gaf .Choice .ShowLeaderLines =_b .NewCT_Boolean ();_fecb ._gaf .Choice .ShowLeaderLines .ValAttr =_bd .Bool (b );};func (_bdb DataLabels )SetShowLegendKey (b bool ){_bdb .ensureChoice ();_bdb ._gaf .Choice .ShowLegendKey =_b .NewCT_Boolean ();_bdb ._gaf .Choice .ShowLegendKey .ValAttr =_bd .Bool (b );};
2020-11-09 01:00:18 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to an Pie chart.
func (_caa PieChart )AddSeries ()PieChartSeries {_faeg :=_b .NewCT_PieSer ();_caa ._aaa .Ser =append (_caa ._aaa .Ser ,_faeg );_faeg .Idx .ValAttr =uint32 (len (_caa ._aaa .Ser )-1);_faeg .Order .ValAttr =uint32 (len (_caa ._aaa .Ser )-1);_abed :=PieChartSeries {_faeg };_abed .InitializeDefaults ();return _abed ;};
2021-09-22 16:41:01 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_dgc SurfaceChart )X ()*_b .CT_SurfaceChart {return _dgc ._dccgf };func (_bagf DataLabels )SetShowValue (b bool ){_bagf .ensureChoice ();_bagf ._gaf .Choice .ShowVal =_b .NewCT_Boolean ();_bagf ._gaf .Choice .ShowVal .ValAttr =_bd .Bool (b );};
// InitializeDefaults initializes an Pie series to the default values.
func (_ace PieChartSeries )InitializeDefaults (){};
2020-08-23 14:15:53 +00:00
2022-02-05 13:05:36 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_gdca PieChartSeries )X ()*_b .CT_PieSer {return _gdca ._bfe };func (_ede DateAxis )SetMinorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_ede ._adfg .MinorTickMark =nil ;}else {_ede ._adfg .MinorTickMark =_b .NewCT_TickMark ();_ede ._adfg .MinorTickMark .ValAttr =m ;};};
2020-10-12 13:59:12 +00:00
2022-06-27 19:44:23 +00:00
// AreaChartSeries is a series to be used on an area chart.
type AreaChartSeries struct{_ge *_b .CT_AreaSer };func (_caf DataLabels )SetShowCategoryName (b bool ){_caf .ensureChoice ();_caf ._gaf .Choice .ShowCatName =_b .NewCT_Boolean ();_caf ._gaf .Choice .ShowCatName .ValAttr =_bd .Bool (b );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddTitle sets a new title on the chart.
func (_edc Chart )AddTitle ()Title {_edc ._gbf .Chart .Title =_b .NewCT_Title ();_edc ._gbf .Chart .Title .Overlay =_b .NewCT_Boolean ();_edc ._gbf .Chart .Title .Overlay .ValAttr =_bd .Bool (false );_edc ._gbf .Chart .AutoTitleDeleted =_b .NewCT_Boolean ();_edc ._gbf .Chart .AutoTitleDeleted .ValAttr =_bd .Bool (false );_dae :=MakeTitle (_edc ._gbf .Chart .Title );_dae .InitializeDefaults ();return _dae ;};
2020-10-12 13:59:12 +00:00
2022-06-27 19:44:23 +00:00
// Labels returns the data label properties.
func (_bdc ScatterChartSeries )Labels ()DataLabels {if _bdc ._edd .DLbls ==nil {_bdc ._edd .DLbls =_b .NewCT_DLbls ();};return MakeDataLabels (_bdc ._edd .DLbls );};
2022-02-25 19:20:45 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_gfdc ScatterChart )X ()*_b .CT_ScatterChart {return _gfdc ._cg };type GridLines struct{_abc *_b .CT_ChartLines };
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
func (_ebff PieChartSeries )Values ()NumberDataSource {if _ebff ._bfe .Val ==nil {_ebff ._bfe .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_ebff ._bfe .Val );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_fbe DateAxis )X ()*_b .CT_DateAx {return _fbe ._adfg };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_afb Bar3DChart )X ()*_b .CT_Bar3DChart {return _afb ._bde };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_ece SeriesAxis )X ()*_b .CT_SerAx {return _ece ._dbc };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// Pie3DChart is a Pie3D chart.
type Pie3DChart struct{chartBase ;_caed *_b .CT_Pie3DChart ;};type ValueAxis struct{_eaa *_b .CT_ValAx };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_ecdg GridLines )X ()*_b .CT_ChartLines {return _ecdg ._abc };
2021-05-31 16:22:30 +00:00
2022-06-27 19:44:23 +00:00
// BarChart is a 2D bar chart.
type BarChart struct{chartBase ;_ec *_b .CT_BarChart ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// RemoveLegend removes the legend if the chart has one.
func (_ffdd Chart )RemoveLegend (){_ffdd ._gbf .Chart .Legend =nil };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// Values returns the value data source.
func (_age AreaChartSeries )Values ()NumberDataSource {if _age ._ge .Val ==nil {_age ._ge .Val =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_age ._ge .Val );};
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_cec Title )X ()*_b .CT_Title {return _cec ._dbbb };
2020-08-23 14:15:53 +00:00
2021-11-10 11:45:21 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_dd BubbleChartSeries )X ()*_b .CT_BubbleSer {return _dd ._aff };
2022-04-09 14:27:46 +00:00
2022-06-27 19:44:23 +00:00
// Index returns the index of the series
func (_ecfc SurfaceChartSeries )Index ()uint32 {return _ecfc ._gbca .Idx .ValAttr };
2022-04-09 14:27:46 +00:00
2022-06-27 19:44:23 +00:00
// Properties returns the line chart series shape properties.
func (_cafe SurfaceChartSeries )Properties ()_bgd .ShapeProperties {if _cafe ._gbca .SpPr ==nil {_cafe ._gbca .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_cafe ._gbca .SpPr );};type SurfaceChartSeries struct{_gbca *_b .CT_SurfaceSer };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_feg BubbleChart )X ()*_b .CT_BubbleChart {return _feg ._ebf };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to a bar chart.
func (_fe Bar3DChart )AddSeries ()BarChartSeries {_eae :=_fe .nextColor (len (_fe ._bde .Ser ));_gba :=_b .NewCT_BarSer ();_fe ._bde .Ser =append (_fe ._bde .Ser ,_gba );_gba .Idx .ValAttr =uint32 (len (_fe ._bde .Ser )-1);_gba .Order .ValAttr =uint32 (len (_fe ._bde .Ser )-1);_ege :=BarChartSeries {_gba };_ege .InitializeDefaults ();_ege .Properties ().SetSolidFill (_eae );return _ege ;};
2022-02-25 19:20:45 +00:00
2022-06-27 19:44:23 +00:00
// Bar3DChart is a 3D bar chart.
type Bar3DChart struct{chartBase ;_bde *_b .CT_Bar3DChart ;};func (_efcb ValueAxis )SetMajorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_efcb ._eaa .MajorTickMark =nil ;}else {_efcb ._eaa .MajorTickMark =_b .NewCT_TickMark ();_efcb ._eaa .MajorTickMark .ValAttr =m ;};};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// BubbleChart is a 2D Bubble chart.
type BubbleChart struct{chartBase ;_ebf *_b .CT_BubbleChart ;};func (_cfc StockChart )AddAxis (axis Axis ){_cde :=_b .NewCT_UnsignedInt ();_cde .ValAttr =axis .AxisID ();_cfc ._bdd .AxId =append (_cfc ._bdd .AxId ,_cde );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the bar chart to its defaults
func (_badd PieOfPieChart )InitializeDefaults (){_badd ._acc .VaryColors =_b .NewCT_Boolean ();_badd ._acc .VaryColors .ValAttr =_bd .Bool (true );_badd .SetType (_b .ST_OfPieTypePie );_badd ._acc .SecondPieSize =_b .NewCT_SecondPieSize ();_badd ._acc .SecondPieSize .ValAttr =&_b .ST_SecondPieSize {};_badd ._acc .SecondPieSize .ValAttr .ST_SecondPieSizeUShort =_bd .Uint16 (75);_ccc :=_b .NewCT_ChartLines ();_ccc .SpPr =_c .NewCT_ShapeProperties ();_ebdb :=_bgd .MakeShapeProperties (_ccc .SpPr );_ebdb .LineProperties ().SetSolidFill (_a .Auto );_badd ._acc .SerLines =append (_badd ._acc .SerLines ,_ccc );};type NumberDataSource struct{_bba *_b .CT_NumDataSource };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddBubbleChart adds a new bubble chart.
func (_dccg Chart )AddBubbleChart ()BubbleChart {_bbg :=_b .NewCT_PlotAreaChoice ();_dccg ._gbf .Chart .PlotArea .Choice =append (_dccg ._gbf .Chart .PlotArea .Choice ,_bbg );_bbg .BubbleChart =_b .NewCT_BubbleChart ();_fce :=BubbleChart {_ebf :_bbg .BubbleChart };_fce .InitializeDefaults ();return _fce ;};
2021-03-16 20:51:18 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to a Stock chart.
func (_agdb StockChart )AddSeries ()LineChartSeries {_fbg :=_b .NewCT_LineSer ();_agdb ._bdd .Ser =append (_agdb ._bdd .Ser ,_fbg );_fbg .Idx .ValAttr =uint32 (len (_agdb ._bdd .Ser )-1);_fbg .Order .ValAttr =uint32 (len (_agdb ._bdd .Ser )-1);_dbb :=LineChartSeries {_fbg };_dbb .Values ().CreateEmptyNumberCache ();_dbb .Properties ().LineProperties ().SetNoFill ();return _dbb ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// X returns the inner wrapped XML type.
func (_ab BarChartSeries )X ()*_b .CT_BarSer {return _ab ._ff };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +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{_cab *_b .CT_AxDataSource };
2022-02-25 19:20:45 +00:00
2022-06-27 19:44:23 +00:00
// BarChartSeries is a series to be used on a bar chart.
type BarChartSeries struct{_ff *_b .CT_BarSer };func (_dcb Marker )SetSize (sz uint8 ){_dcb ._fffa .Size =_b .NewCT_MarkerSize ();_dcb ._fffa .Size .ValAttr =&sz ;};func (_abcb ScatterChartSeries )Values ()NumberDataSource {if _abcb ._edd .YVal ==nil {_abcb ._edd .YVal =_b .NewCT_NumDataSource ();};return MakeNumberDataSource (_abcb ._edd .YVal );};
2022-02-25 19:20:45 +00:00
2022-04-09 14:27:46 +00:00
// CategoryAxis returns the category data source.
2022-06-27 19:44:23 +00:00
func (_eea PieChartSeries )CategoryAxis ()CategoryAxisDataSource {if _eea ._bfe .Cat ==nil {_eea ._bfe .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_eea ._bfe .Cat );};
2020-08-31 22:58:25 +00:00
2022-06-27 19:44:23 +00:00
// Properties returns the Bubble chart series shape properties.
func (_deg BubbleChartSeries )Properties ()_bgd .ShapeProperties {if _deg ._aff .SpPr ==nil {_deg ._aff .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_deg ._aff .SpPr );};
2020-08-31 22:58:25 +00:00
2022-06-27 19:44:23 +00:00
// SurfaceChart is a 3D surface chart, viewed from the top-down.
type SurfaceChart struct{chartBase ;_dccgf *_b .CT_SurfaceChart ;};
2020-12-17 22:07:08 +00:00
2022-06-27 19:44:23 +00:00
// SetText sets the series text
func (_efde LineChartSeries )SetText (s string ){_efde ._fbeg .Tx =_b .NewCT_SerTx ();_efde ._fbeg .Tx .Choice .V =&s ;};func (_ddc Legend )SetPosition (p _b .ST_LegendPos ){if p ==_b .ST_LegendPosUnset {_ddc ._gedd .LegendPos =nil ;}else {_ddc ._gedd .LegendPos =_b .NewCT_LegendPos ();_ddc ._gedd .LegendPos .ValAttr =p ;};};
2020-12-17 22:07:08 +00:00
2022-06-27 19:44:23 +00:00
// SetDisplayBlanksAs controls how missing values are displayed.
func (_efa Chart )SetDisplayBlanksAs (v _b .ST_DispBlanksAs ){_efa ._gbf .Chart .DispBlanksAs =_b .NewCT_DispBlanksAs ();_efa ._gbf .Chart .DispBlanksAs .ValAttr =v ;};func (_aba ValueAxis )SetMinorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_aba ._eaa .MinorTickMark =nil ;}else {_aba ._eaa .MinorTickMark =_b .NewCT_TickMark ();_aba ._eaa .MinorTickMark .ValAttr =m ;};};func (_bge ScatterChart )InitializeDefaults (){_bge ._cg .ScatterStyle .ValAttr =_b .ST_ScatterStyleMarker ;};
2020-08-23 14:15:53 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_af Area3DChart )X ()*_b .CT_Area3DChart {return _af ._gd };func (_ccd Title )InitializeDefaults (){_ccd .SetText ("\u0054\u0069\u0074l\u0065");_ccd .RunProperties ().SetSize (16*_d .Point );_ccd .RunProperties ().SetSolidFill (_a .Black );_ccd .RunProperties ().SetFont ("\u0043\u0061\u006c\u0069\u0062\u0020\u0072\u0069");_ccd .RunProperties ().SetBold (false );};
2021-01-04 16:11:39 +00:00
2022-06-27 19:44:23 +00:00
// SetText sets the series text.
func (_ffdde RadarChartSeries )SetText (s string ){_ffdde ._agd .Tx =_b .NewCT_SerTx ();_ffdde ._agd .Tx .Choice .V =&s ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// DoughnutChart is a Doughnut chart.
type DoughnutChart struct{chartBase ;_cbd *_b .CT_DoughnutChart ;};func (_fdd CategoryAxis )SetPosition (p _b .ST_AxPos ){_fdd ._egd .AxPos =_b .NewCT_AxPos ();_fdd ._egd .AxPos .ValAttr =p ;};func (_effg DateAxis )SetPosition (p _b .ST_AxPos ){_effg ._adfg .AxPos =_b .NewCT_AxPos ();_effg ._adfg .AxPos .ValAttr =p ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// CategoryAxis returns the category data source.
func (_eff BarChartSeries )CategoryAxis ()CategoryAxisDataSource {if _eff ._ff .Cat ==nil {_eff ._ff .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_eff ._ff .Cat );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddCategoryAxis adds a category axis.
func (_aae Chart )AddCategoryAxis ()CategoryAxis {_dff :=_b .NewCT_CatAx ();if _aae ._gbf .Chart .PlotArea .CChoice ==nil {_aae ._gbf .Chart .PlotArea .CChoice =_b .NewCT_PlotAreaChoice1 ();};_dff .AxId =_b .NewCT_UnsignedInt ();_dff .AxId .ValAttr =0x7FFFFFFF&_bg .Uint32 ();_aae ._gbf .Chart .PlotArea .CChoice .CatAx =append (_aae ._gbf .Chart .PlotArea .CChoice .CatAx ,_dff );_dff .Auto =_b .NewCT_Boolean ();_dff .Auto .ValAttr =_bd .Bool (true );_dff .Delete =_b .NewCT_Boolean ();_dff .Delete .ValAttr =_bd .Bool (false );_bc :=MakeCategoryAxis (_dff );_bc .InitializeDefaults ();return _bc ;};
2020-11-09 01:00:18 +00:00
2022-06-27 19:44:23 +00:00
// AddStockChart adds a new stock chart.
func (_ceg Chart )AddStockChart ()StockChart {_ffd :=_b .NewCT_PlotAreaChoice ();_ceg ._gbf .Chart .PlotArea .Choice =append (_ceg ._gbf .Chart .PlotArea .Choice ,_ffd );_ffd .StockChart =_b .NewCT_StockChart ();_ecd :=StockChart {_bdd :_ffd .StockChart };_ecd .InitializeDefaults ();return _ecd ;};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddSurface3DChart adds a new 3D surface chart to a chart.
func (_gcg Chart )AddSurface3DChart ()Surface3DChart {_aee :=_b .NewCT_PlotAreaChoice ();_gcg ._gbf .Chart .PlotArea .Choice =append (_gcg ._gbf .Chart .PlotArea .Choice ,_aee );_aee .Surface3DChart =_b .NewCT_Surface3DChart ();_bf (_gcg ._gbf .Chart );_aga :=Surface3DChart {_fega :_aee .Surface3DChart };_aga .InitializeDefaults ();return _aga ;};func (_eg Area3DChart )AddAxis (axis Axis ){_ce :=_b .NewCT_UnsignedInt ();_ce .ValAttr =axis .AxisID ();_eg ._gd .AxId =append (_eg ._gd .AxId ,_ce );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// SetValues sets values directly on a source.
func (_bff NumberDataSource )SetValues (v []float64 ){_bff .ensureChoice ();_bff ._bba .Choice .NumRef =nil ;_bff ._bba .Choice .NumLit =_b .NewCT_NumData ();_bff ._bba .Choice .NumLit .PtCount =_b .NewCT_UnsignedInt ();_bff ._bba .Choice .NumLit .PtCount .ValAttr =uint32 (len (v ));for _cae ,_ecb :=range v {_bff ._bba .Choice .NumLit .Pt =append (_bff ._bba .Choice .NumLit .Pt ,&_b .CT_NumVal {IdxAttr :uint32 (_cae ),V :_f .Sprintf ("\u0025\u0067",_ecb )});};};func MakeValueAxis (x *_b .CT_ValAx )ValueAxis {return ValueAxis {x }};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// Properties returns the line chart series shape properties.
func (_abf LineChartSeries )Properties ()_bgd .ShapeProperties {if _abf ._fbeg .SpPr ==nil {_abf ._fbeg .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_abf ._fbeg .SpPr );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// SetType sets the type the secone pie to either pie or bar
func (_eda PieOfPieChart )SetType (t _b .ST_OfPieType ){_eda ._acc .OfPieType .ValAttr =t };
2021-05-31 16:22:30 +00:00
2022-04-09 14:27:46 +00:00
// Properties returns the bar chart series shape properties.
2022-06-27 19:44:23 +00:00
func (_dde RadarChartSeries )Properties ()_bgd .ShapeProperties {if _dde ._agd .SpPr ==nil {_dde ._agd .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_dde ._agd .SpPr );};
2022-02-25 19:20:45 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults the Bubble chart to its defaults
func (_cf BubbleChart )InitializeDefaults (){};
2021-05-31 16:22:30 +00:00
2022-02-05 13:05:36 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_gefa RadarChartSeries )X ()*_b .CT_RadarSer {return _gefa ._agd };
2021-11-10 11:45:21 +00:00
2022-06-27 19:44:23 +00:00
// SetLabelReference is used to set the source data to a range of cells
// containing strings.
func (_ba CategoryAxisDataSource )SetLabelReference (s string ){_ba ._cab .Choice =_b .NewCT_AxDataSourceChoice ();_ba ._cab .Choice .StrRef =_b .NewCT_StrRef ();_ba ._cab .Choice .StrRef .F =s ;};
2021-11-10 11:45:21 +00:00
2022-06-27 19:44:23 +00:00
// AddPieOfPieChart adds a new pie chart to a chart.
func (_aa Chart )AddPieOfPieChart ()PieOfPieChart {_gbc :=_b .NewCT_PlotAreaChoice ();_aa ._gbf .Chart .PlotArea .Choice =append (_aa ._gbf .Chart .PlotArea .Choice ,_gbc );_gbc .OfPieChart =_b .NewCT_OfPieChart ();_ebe :=PieOfPieChart {_acc :_gbc .OfPieChart };_ebe .InitializeDefaults ();return _ebe ;};
2021-11-10 11:45:21 +00:00
2022-06-27 19:44:23 +00:00
// CategoryAxis returns the category data source.
func (_gg AreaChartSeries )CategoryAxis ()CategoryAxisDataSource {if _gg ._ge .Cat ==nil {_gg ._ge .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_gg ._ge .Cat );};
2021-11-10 11:45:21 +00:00
2022-06-27 19:44:23 +00:00
// ScatterChartSeries is the data series for a scatter chart.
type ScatterChartSeries struct{_edd *_b .CT_ScatterSer };
2020-08-23 14:15:53 +00:00
2022-02-05 13:05:36 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_gbeb PieOfPieChart )X ()*_b .CT_OfPieChart {return _gbeb ._acc };
2022-06-27 19:44:23 +00:00
// BubbleChartSeries is a series to be used on a Bubble chart.
type BubbleChartSeries struct{_aff *_b .CT_BubbleSer };
2021-11-10 11:45:21 +00:00
2022-06-27 19:44:23 +00:00
// SetIndex sets the index of the series
func (_aag ScatterChartSeries )SetIndex (idx uint32 ){_aag ._edd .Idx .ValAttr =idx };
2021-01-04 16:11:39 +00:00
2022-06-27 19:44:23 +00:00
// AddLineChart adds a new line chart to a chart.
func (_cbb Chart )AddLineChart ()LineChart {_fgb :=_b .NewCT_PlotAreaChoice ();_cbb ._gbf .Chart .PlotArea .Choice =append (_cbb ._gbf .Chart .PlotArea .Choice ,_fgb );_fgb .LineChart =_b .NewCT_LineChart ();_fgb .LineChart .Grouping =_b .NewCT_Grouping ();_fgb .LineChart .Grouping .ValAttr =_b .ST_GroupingStandard ;return LineChart {_ebae :_fgb .LineChart };};
2022-02-05 13:05:36 +00:00
2022-06-27 19:44:23 +00:00
// RemoveTitle removes any existing title from the chart.
func (_abg Chart )RemoveTitle (){_abg ._gbf .Chart .Title =nil ;_abg ._gbf .Chart .AutoTitleDeleted =_b .NewCT_Boolean ();_abg ._gbf .Chart .AutoTitleDeleted .ValAttr =_bd .Bool (true );};func (_dag CategoryAxis )InitializeDefaults (){_dag .SetPosition (_b .ST_AxPosB );_dag .SetMajorTickMark (_b .ST_TickMarkOut );_dag .SetMinorTickMark (_b .ST_TickMarkIn );_dag .SetTickLabelPosition (_b .ST_TickLblPosNextTo );_dag .MajorGridLines ().Properties ().LineProperties ().SetSolidFill (_a .LightGray );_dag .Properties ().LineProperties ().SetSolidFill (_a .Black );};func (_ebfb LineChartSeries )CategoryAxis ()CategoryAxisDataSource {if _ebfb ._fbeg .Cat ==nil {_ebfb ._fbeg .Cat =_b .NewCT_AxDataSource ();};return MakeAxisDataSource (_ebfb ._fbeg .Cat );};
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// SetExplosion sets the value that the segements of the pie are 'exploded' by
func (_bcc PieChartSeries )SetExplosion (v uint32 ){_bcc ._bfe .Explosion =_b .NewCT_UnsignedInt ();_bcc ._bfe .Explosion .ValAttr =v ;};func (_dbbg Surface3DChart )InitializeDefaults (){_dbbg ._fega .Wireframe =_b .NewCT_Boolean ();_dbbg ._fega .Wireframe .ValAttr =_bd .Bool (false );_dbbg ._fega .BandFmts =_b .NewCT_BandFmts ();for _cdgd :=0;_cdgd < 15;_cdgd ++{_dfae :=_b .NewCT_BandFmt ();_dfae .Idx .ValAttr =uint32 (_cdgd );_dfae .SpPr =_c .NewCT_ShapeProperties ();_fbeb :=_bgd .MakeShapeProperties (_dfae .SpPr );_fbeb .SetSolidFill (_dbbg .nextColor (_cdgd ));_dbbg ._fega .BandFmts .BandFmt =append (_dbbg ._fega .BandFmts .BandFmt ,_dfae );};};func (_gbag ValueAxis )AxisID ()uint32 {return _gbag ._eaa .AxId .ValAttr };
2020-08-23 14:15:53 +00:00
2022-06-27 19:44:23 +00:00
// AddSeries adds a default series to a line chart.
func (_fff Line3DChart )AddSeries ()LineChartSeries {_ded :=_fff .nextColor (len (_fff ._adg .Ser ));_eedc :=_b .NewCT_LineSer ();_fff ._adg .Ser =append (_fff ._adg .Ser ,_eedc );_eedc .Idx .ValAttr =uint32 (len (_fff ._adg .Ser )-1);_eedc .Order .ValAttr =uint32 (len (_fff ._adg .Ser )-1);_fae :=LineChartSeries {_eedc };_fae .InitializeDefaults ();_fae .Properties ().LineProperties ().SetSolidFill (_ded );_fae .Properties ().SetSolidFill (_ded );return _fae ;};
2021-01-04 16:11:39 +00:00
2022-06-27 19:44:23 +00:00
// SetText sets the series text
func (_daf ScatterChartSeries )SetText (s string ){_daf ._edd .Tx =_b .NewCT_SerTx ();_daf ._edd .Tx .Choice .V =&s ;};func (_abdf SeriesAxis )InitializeDefaults (){};func (_aeg SeriesAxis )SetCrosses (axis Axis ){_aeg ._dbc .CrossAx .ValAttr =axis .AxisID ()};
2021-01-04 16:11:39 +00:00
2022-06-27 19:44:23 +00:00
// Marker returns the marker properties.
func (_dfc LineChartSeries )Marker ()Marker {if _dfc ._fbeg .Marker ==nil {_dfc ._fbeg .Marker =_b .NewCT_Marker ();};return MakeMarker (_dfc ._fbeg .Marker );};func (_dfe CategoryAxis )SetMajorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_dfe ._egd .MajorTickMark =nil ;}else {_dfe ._egd .MajorTickMark =_b .NewCT_TickMark ();_dfe ._egd .MajorTickMark .ValAttr =m ;};};func (_ddf Marker )Properties ()_bgd .ShapeProperties {if _ddf ._fffa .SpPr ==nil {_ddf ._fffa .SpPr =_c .NewCT_ShapeProperties ();};return _bgd .MakeShapeProperties (_ddf ._fffa .SpPr );};func MakeChart (x *_b .ChartSpace )Chart {return Chart {x }};
2021-04-23 20:00:00 +00:00
2022-06-27 19:44:23 +00:00
// Order returns the order of the series
func (_eebc LineChartSeries )Order ()uint32 {return _eebc ._fbeg .Order .ValAttr };
2021-07-30 17:03:26 +00:00
2022-06-27 19:44:23 +00:00
// InitializeDefaults initializes a Bubble chart series to the default values.
func (_abe BubbleChartSeries )InitializeDefaults (){};func (_gdb LineChartSeries )InitializeDefaults (){_gdb .Properties ().LineProperties ().SetWidth (1*_d .Point );_gdb .Properties ().LineProperties ().SetSolidFill (_a .Black );_gdb .Properties ().LineProperties ().SetJoin (_bgd .LineJoinRound );_gdb .Marker ().SetSymbol (_b .ST_MarkerStyleNone );_gdb .Labels ().SetShowLegendKey (false );_gdb .Labels ().SetShowValue (false );_gdb .Labels ().SetShowPercent (false );_gdb .Labels ().SetShowCategoryName (false );_gdb .Labels ().SetShowSeriesName (false );_gdb .Labels ().SetShowLeaderLines (false );};
2021-09-22 16:41:01 +00:00
2022-06-27 19:44:23 +00:00
// RadarChartSeries is a series to be used on an Radar chart.
type RadarChartSeries struct{_agd *_b .CT_RadarSer };var _dfa =[]_a .Color {_a .RGB (0x33,0x66,0xcc),_a .RGB (0xDC,0x39,0x12),_a .RGB (0xFF,0x99,0x00),_a .RGB (0x10,0x96,0x18),_a .RGB (0x99,0x00,0x99),_a .RGB (0x3B,0x3E,0xAC),_a .RGB (0x00,0x99,0xC6),_a .RGB (0xDD,0x44,0x77),_a .RGB (0x66,0xAA,0x00),_a .RGB (0xB8,0x2E,0x2E),_a .RGB (0x31,0x63,0x95),_a .RGB (0x99,0x44,0x99),_a .RGB (0x22,0xAA,0x99),_a .RGB (0xAA,0xAA,0x11),_a .RGB (0x66,0x33,0xCC),_a .RGB (0xE6,0x73,0x00),_a .RGB (0x8B,0x07,0x07),_a .RGB (0x32,0x92,0x62),_a .RGB (0x55,0x74,0xA6),_a .RGB (0x3B,0x3E,0xAC)};
2022-01-15 21:17:38 +00:00
2022-06-27 19:44:23 +00:00
// Order returns the order of the series
func (_fgbc SurfaceChartSeries )Order ()uint32 {return _fgbc ._gbca .Order .ValAttr };func (_dbg DateAxis )SetMajorTickMark (m _b .ST_TickMark ){if m ==_b .ST_TickMarkUnset {_dbg ._adfg .MajorTickMark =nil ;}else {_dbg ._adfg .MajorTickMark =_b .NewCT_TickMark ();_dbg ._adfg .MajorTickMark .ValAttr =m ;};};
2022-02-05 13:05:36 +00:00
2022-04-09 14:27:46 +00:00
// X returns the inner wrapped XML type.
2022-06-27 19:44:23 +00:00
func (_efc Marker )X ()*_b .CT_Marker {return _efc ._fffa };