Skip to content

Commit c4e063c

Browse files
committed
Add docs for Legend options of chart
1 parent e8939ae commit c4e063c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

chart.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ func (opts *Chart) parseTitle() {
765765
// Categories
766766
// Values
767767
// Fill
768+
// Legend
768769
// Line
769770
// Marker
770771
// DataLabel
@@ -787,7 +788,10 @@ func (opts *Chart) parseTitle() {
787788
// optional and the default value was same with 'Values'.
788789
//
789790
// Fill: This set the format for the data series fill. The 'Fill' property is
790-
// optional
791+
// optional.
792+
//
793+
// Legend: This set the font of legend text for a data series. The 'Legend'
794+
// property is optional.
791795
//
792796
// Line: This sets the line format of the line chart. The 'Line' property is
793797
// optional and if it isn't supplied it will default style. The options that
@@ -1014,6 +1018,9 @@ func (opts *Chart) parseTitle() {
10141018
// Set chart size by 'Dimension' property. The 'Dimension' property is optional.
10151019
// The default width is 480, and height is 260.
10161020
//
1021+
// Set chart legend for all data series by 'Legend' property. The 'Legend'
1022+
// property is optional.
1023+
//
10171024
// Set the bubble size in all data series for the bubble chart or 3D bubble
10181025
// chart by 'BubbleSizes' property. The 'BubbleSizes' property is optional. The
10191026
// default width is 100, and the value should be great than 0 and less or equal

chart_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ func TestAddChart(t *testing.T) {
171171
Width: 1,
172172
},
173173
},
174-
Legend: ChartLegend{Font: &Font{Family: "Arial", Size: 11, Strike: true, Color: "777777"}}},
174+
Legend: ChartLegend{Font: &Font{Family: "Arial", Size: 11, Strike: true, Color: "777777"}},
175+
},
175176
}
176177
series2 := []ChartSeries{
177178
{

0 commit comments

Comments
 (0)