1
0
Fork 0

Adding upstream version 2.1.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-18 07:17:02 +02:00
parent c8c64afc61
commit 41a2f19f12
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
220 changed files with 19814 additions and 0 deletions

View file

@ -0,0 +1,53 @@
package main
import (
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {
sbc := chart.StackedBarChart{
Title: "Test Stacked Bar Chart",
Background: chart.Style{
Padding: chart.Box{
Top: 40,
},
},
Height: 512,
Bars: []chart.StackedBar{
{
Name: "This is a very long string to test word break wrapping.",
Values: []chart.Value{
{Value: 5, Label: "Blue"},
{Value: 5, Label: "Green"},
{Value: 4, Label: "Gray"},
{Value: 3, Label: "Orange"},
{Value: 3, Label: "Test"},
{Value: 2, Label: "??"},
{Value: 1, Label: "!!"},
},
},
{
Name: "Test",
Values: []chart.Value{
{Value: 10, Label: "Blue"},
{Value: 5, Label: "Green"},
{Value: 1, Label: "Gray"},
},
},
{
Name: "Test 2",
Values: []chart.Value{
{Value: 10, Label: "Blue"},
{Value: 6, Label: "Green"},
{Value: 4, Label: "Gray"},
},
},
},
}
f, _ := os.Create("output.png")
defer f.Close()
sbc.Render(chart.PNG, f)
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB