@@ -158,7 +158,12 @@ func TestAddChart(t *testing.T) {
158
158
{Name : "Sheet1!$A$34" , Categories : "Sheet1!$B$29:$D$29" , Values : "Sheet1!$B$34:$D$34" },
159
159
{Name : "Sheet1!$A$35" , Categories : "Sheet1!$B$29:$D$29" , Values : "Sheet1!$B$35:$D$35" },
160
160
{Name : "Sheet1!$A$36" , Categories : "Sheet1!$B$29:$D$29" , Values : "Sheet1!$B$36:$D$36" },
161
- {Name : "Sheet1!$A$37" , Categories : "Sheet1!$B$29:$D$29" , Values : "Sheet1!$B$37:$D$37" },
161
+ {
162
+ Name : "Sheet1!$A$37" , Categories : "Sheet1!$B$29:$D$29" , Values : "Sheet1!$B$37:$D$37" ,
163
+ Marker : ChartMarker {
164
+ Fill : Fill {Type : "pattern" , Color : []string {"FFFF00" }, Pattern : 1 },
165
+ },
166
+ },
162
167
}
163
168
series2 := []ChartSeries {
164
169
{
@@ -203,14 +208,15 @@ func TestAddChart(t *testing.T) {
203
208
ShowPercent : true ,
204
209
ShowSerName : true ,
205
210
ShowVal : true ,
211
+ Fill : Fill {Type : "pattern" , Pattern : 1 },
206
212
}
207
213
for _ , c := range []struct {
208
214
sheetName , cell string
209
215
opts * Chart
210
216
}{
211
217
{sheetName : "Sheet1" , cell : "P1" , opts : & Chart {Type : Col , Series : series , Format : format , Legend : ChartLegend {Position : "none" , ShowLegendKey : true }, Title : []RichTextRun {{Text : "2D Column Chart" }}, PlotArea : plotArea , Border : ChartLine {Type : ChartLineNone }, ShowBlanksAs : "zero" , XAxis : ChartAxis {Font : Font {Bold : true , Italic : true , Underline : "dbl" , Color : "000000" }, Title : []RichTextRun {{Text : "Primary Horizontal Axis Title" }}}, YAxis : ChartAxis {Font : Font {Bold : false , Italic : false , Underline : "sng" , Color : "777777" }, Title : []RichTextRun {{Text : "Primary Vertical Axis Title" , Font : & Font {Color : "777777" , Bold : true , Italic : true , Size : 12 }}}}}},
212
- {sheetName : "Sheet1" , cell : "X1" , opts : & Chart {Type : ColStacked , Series : series , Format : format , Legend : legend , Title : []RichTextRun {{Text : "2D Stacked Column Chart" }}, PlotArea : plotArea , Border : ChartLine {Type : ChartLineAutomatic }, ShowBlanksAs : "zero" }},
213
- {sheetName : "Sheet1" , cell : "P16" , opts : & Chart {Type : ColPercentStacked , Series : series , Format : format , Legend : legend , Title : []RichTextRun {{Text : "100% Stacked Column Chart" }}, PlotArea : plotArea , Border : ChartLine {Type : ChartLineSolid , Width : 2 }, ShowBlanksAs : "zero" }},
218
+ {sheetName : "Sheet1" , cell : "X1" , opts : & Chart {Type : ColStacked , Series : series , Format : format , Legend : legend , Title : []RichTextRun {{Text : "2D Stacked Column Chart" }}, PlotArea : plotArea , Fill : Fill { Type : "pattern" , Pattern : 1 }, Border : ChartLine {Type : ChartLineAutomatic }, ShowBlanksAs : "zero" }},
219
+ {sheetName : "Sheet1" , cell : "P16" , opts : & Chart {Type : ColPercentStacked , Series : series , Format : format , Legend : legend , Title : []RichTextRun {{Text : "100% Stacked Column Chart" }}, PlotArea : plotArea , Fill : Fill { Type : "pattern" , Color : [] string { "EEEEEE" }, Pattern : 1 }, Border : ChartLine {Type : ChartLineSolid , Width : 2 }, ShowBlanksAs : "zero" }},
214
220
{sheetName : "Sheet1" , cell : "X16" , opts : & Chart {Type : Col3DClustered , Series : series , Format : format , Legend : ChartLegend {Position : "bottom" , ShowLegendKey : false }, Title : []RichTextRun {{Text : "3D Clustered Column Chart" }}, PlotArea : plotArea , ShowBlanksAs : "zero" }},
215
221
{sheetName : "Sheet1" , cell : "P30" , opts : & Chart {Type : Col3DStacked , Series : series , Format : format , Legend : legend , Title : []RichTextRun {{Text : "3D Stacked Column Chart" }}, PlotArea : plotArea , ShowBlanksAs : "zero" }},
216
222
{sheetName : "Sheet1" , cell : "X30" , opts : & Chart {Type : Col3DPercentStacked , Series : series , Format : format , Legend : legend , Title : []RichTextRun {{Text : "3D 100% Stacked Column Chart" }}, PlotArea : plotArea , ShowBlanksAs : "zero" }},
0 commit comments