Compare commits
5 commits
wcharczuk-
...
main
Author | SHA1 | Date | |
---|---|---|---|
63f0be79dd | |||
1f6d76e8b5 | |||
cc8d36edd9 | |||
bd2b44aa38 | |||
|
b46667ea80 |
93 changed files with 227 additions and 173 deletions
1
LICENSE
1
LICENSE
|
@ -1,6 +1,7 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2016 William Charczuk.
|
||||
Copyright (c) 2024 Zeni Kim.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
21
README.md
21
README.md
|
@ -1,8 +1,9 @@
|
|||
go-chart
|
||||
========
|
||||
[![Continuous Integration](https://github.com/wcharczuk/go-chart/actions/workflows/ci.yml/badge.svg)](https://github.com/wcharczuk/go-chart/actions/workflows/ci.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/wcharczuk/go-chart)](https://goreportcard.com/report/github.com/wcharczuk/go-chart)
|
||||
|
||||
Package `chart` is a very simple golang native charting library that supports timeseries and continuous line charts.
|
||||
This project starts from a full copy from [https://git.smarteching.com/zeni/go-chart](https://git.smarteching.com/zeni/go-chart). 28 Oct 2024.
|
||||
|
||||
-
|
||||
|
||||
Master should now be on the v3.x codebase, which overhauls the api significantly. Per usual, see `examples` for more information.
|
||||
|
||||
|
@ -11,7 +12,7 @@ Master should now be on the v3.x codebase, which overhauls the api significantly
|
|||
To install `chart` run the following:
|
||||
|
||||
```bash
|
||||
> go get github.com/wcharczuk/go-chart/v2@latest
|
||||
> go get git.smarteching.com/zeni/go-chart/v2@latest
|
||||
```
|
||||
|
||||
Most of the components are interchangeable so feel free to crib whatever you want.
|
||||
|
@ -20,27 +21,27 @@ Most of the components are interchangeable so feel free to crib whatever you wan
|
|||
|
||||
Spark Lines:
|
||||
|
||||
![](https://raw.githubusercontent.com/wcharczuk/go-chart/master/_images/tvix_ltm.png)
|
||||
![](https://git.smarteching.com/zeni/go-chart/raw/branch/main/_images/tvix_ltm.png)
|
||||
|
||||
Single axis:
|
||||
|
||||
![](https://raw.githubusercontent.com/wcharczuk/go-chart/master/_images/goog_ltm.png)
|
||||
![](https://git.smarteching.com/zeni/go-chart/raw/branch/main/_images/goog_ltm.png)
|
||||
|
||||
Two axis:
|
||||
|
||||
![](https://raw.githubusercontent.com/wcharczuk/go-chart/master/_images/two_axis.png)
|
||||
![](https://git.smarteching.com/zeni/go-chart/raw/branch/main/_images/two_axis.png)
|
||||
|
||||
# Other Chart Types
|
||||
|
||||
Pie Chart:
|
||||
|
||||
![](https://raw.githubusercontent.com/wcharczuk/go-chart/master/_images/pie_chart.png)
|
||||
![](https://git.smarteching.com/zeni/go-chart/raw/branch/main/_images/pie_chart.png)
|
||||
|
||||
The code for this chart can be found in `examples/pie_chart/main.go`.
|
||||
|
||||
Stacked Bar:
|
||||
|
||||
![](https://raw.githubusercontent.com/wcharczuk/go-chart/master/_images/stacked_bar.png)
|
||||
![](https://git.smarteching.com/zeni/go-chart/raw/branch/main/_images/stacked_bar.png)
|
||||
|
||||
The code for this chart can be found in `examples/stacked_bar/main.go`.
|
||||
|
||||
|
@ -48,6 +49,8 @@ The code for this chart can be found in `examples/stacked_bar/main.go`.
|
|||
|
||||
Actual chart configurations and examples can be found in the `./examples/` directory. They are simple CLI programs that write to `output.png` (they are also updated with `go generate`.
|
||||
|
||||
If folder ends in "web", has web servers, so start them with `go run main.go` then access `http://localhost:8080` to see the output.
|
||||
|
||||
# Usage
|
||||
|
||||
Everything starts with the `chart.Chart` object. The bare minimum to draw a chart would be the following:
|
||||
|
@ -58,7 +61,7 @@ import (
|
|||
...
|
||||
"bytes"
|
||||
...
|
||||
"github.com/wcharczuk/go-chart/v2" //exposes "chart"
|
||||
"git.smarteching.com/zeni/go-chart/v2" //exposes "chart"
|
||||
)
|
||||
|
||||
graph := chart.Chart{
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"image/color"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestAnnotationSeriesMeasure(t *testing.T) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"math"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestBarChartRender(t *testing.T) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"math"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestBollingerBandSeries(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"math"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestBoxClone(t *testing.T) {
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestChartGetDPI(t *testing.T) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package chart
|
||||
|
||||
import "github.com/wcharczuk/go-chart/v2/drawing"
|
||||
import "git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
|
||||
var (
|
||||
// ColorWhite is white.
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestConcatSeries(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestRangeTranslate(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestContinuousSeries(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestDonutChart(t *testing.T) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"image/color"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestColorFromHex(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package drawing
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
type point struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
chart "github.com/wcharczuk/go-chart/v2"
|
||||
chart "git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
chart "github.com/wcharczuk/go-chart/v2"
|
||||
chart "git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
@ -5,8 +5,8 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
55
examples/bar_chart_web/main.go
Normal file
55
examples/bar_chart_web/main.go
Normal file
|
@ -0,0 +1,55 @@
|
|||
package main
|
||||
|
||||
//go:generate go run main.go
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||
graph := chart.BarChart{
|
||||
Title: "Test Bar Chart",
|
||||
Background: chart.Style{
|
||||
Padding: chart.Box{
|
||||
Top: 40,
|
||||
},
|
||||
},
|
||||
Height: 512,
|
||||
BarWidth: 60,
|
||||
Bars: []chart.Value{
|
||||
{Value: 5.25, Label: "Blue"},
|
||||
{Value: 4.88, Label: "Green"},
|
||||
{Value: 4.74, Label: "Gray"},
|
||||
{Value: 3.22, Label: "Orange"},
|
||||
{Value: 3, Label: "Test"},
|
||||
{Value: 2.27, Label: "??"},
|
||||
{Value: 1, Label: "!!"},
|
||||
},
|
||||
}
|
||||
|
||||
res.Header().Set("Content-Type", "image/png")
|
||||
err := graph.Render(chart.PNG, res)
|
||||
if err != nil {
|
||||
fmt.Printf("Error rendering chart: %v\n", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func port() string {
|
||||
if len(os.Getenv("PORT")) > 0 {
|
||||
return os.Getenv("PORT")
|
||||
}
|
||||
return "8080"
|
||||
}
|
||||
|
||||
func main() {
|
||||
listenPort := fmt.Sprintf(":%s", port())
|
||||
fmt.Printf("Listening on %s\n", listenPort)
|
||||
http.HandleFunc("/", drawChart)
|
||||
log.Fatal(http.ListenAndServe(listenPort, nil))
|
||||
}
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func random(min, max float64) float64 {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
// Note: Additional examples on how to add Stylesheets are in the custom_stylesheets example
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,8 +5,8 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,8 +5,8 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
const style = "svg .background { fill: white; }" +
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
chart "github.com/wcharczuk/go-chart/v2"
|
||||
chart "git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
chart "github.com/wcharczuk/go-chart/v2"
|
||||
chart "git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
55
examples/pie_chart_web/main.go
Normal file
55
examples/pie_chart_web/main.go
Normal file
|
@ -0,0 +1,55 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||
pie := chart.PieChart{
|
||||
Width: 512,
|
||||
Height: 512,
|
||||
Values: []chart.Value{
|
||||
{Value: 5, Label: "Blue"},
|
||||
{Value: 5, Label: "Green"},
|
||||
{Value: 4, Label: "Gray"},
|
||||
{Value: 4, Label: "Orange"},
|
||||
{Value: 3, Label: "Deep Blue"},
|
||||
{Value: 3, Label: "??"},
|
||||
{Value: 1, Label: "!!"},
|
||||
},
|
||||
}
|
||||
|
||||
res.Header().Set("Content-Type", "image/png")
|
||||
err := pie.Render(chart.PNG, res)
|
||||
if err != nil {
|
||||
fmt.Printf("Error rendering pie chart: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
func drawChartRegression(res http.ResponseWriter, req *http.Request) {
|
||||
pie := chart.PieChart{
|
||||
Width: 512,
|
||||
Height: 512,
|
||||
Values: []chart.Value{
|
||||
{Value: 5, Label: "Blue"},
|
||||
{Value: 2, Label: "Two"},
|
||||
{Value: 1, Label: "One"},
|
||||
},
|
||||
}
|
||||
|
||||
res.Header().Set("Content-Type", chart.ContentTypeSVG)
|
||||
err := pie.Render(chart.SVG, res)
|
||||
if err != nil {
|
||||
fmt.Printf("Error rendering pie chart: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/", drawChart)
|
||||
http.HandleFunc("/reg", drawChartRegression)
|
||||
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||
}
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
chart "github.com/wcharczuk/go-chart/v2"
|
||||
chart "git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
var lock sync.Mutex
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
_ "net/http/pprof"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||
|
|
|
@ -5,7 +5,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -5,8 +5,8 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
chart "github.com/wcharczuk/go-chart/v2"
|
||||
chart "git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2"
|
||||
"git.smarteching.com/zeni/go-chart/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestFirstValueAnnotation(t *testing.T) {
|
||||
|
|
2
font.go
2
font.go
|
@ -3,8 +3,8 @@ package chart
|
|||
import (
|
||||
"sync"
|
||||
|
||||
"git.smarteching.com/zeni/go-chart/v2/roboto"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"github.com/wcharczuk/go-chart/v2/roboto"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
6
go.mod
6
go.mod
|
@ -1,8 +1,8 @@
|
|||
module github.com/wcharczuk/go-chart/v2
|
||||
module git.smarteching.com/zeni/go-chart/v2
|
||||
|
||||
go 1.15
|
||||
go 1.23.1
|
||||
|
||||
require (
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
|
||||
golang.org/x/image v0.18.0
|
||||
golang.org/x/image v0.21.0
|
||||
)
|
||||
|
|
64
go.sum
64
go.sum
|
@ -1,64 +1,4 @@
|
|||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
|
||||
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
|
||||
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestGenerateGridLines(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestHistogramSeries(t *testing.T) {
|
||||
|
|
2
jet.go
2
jet.go
|
@ -1,6 +1,6 @@
|
|||
package chart
|
||||
|
||||
import "github.com/wcharczuk/go-chart/v2/drawing"
|
||||
import "git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
|
||||
// Jet is a color map provider based on matlab's jet color map.
|
||||
func Jet(v, vmin, vmax float64) drawing.Color {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestLastValueAnnotationSeries(t *testing.T) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package chart
|
||||
|
||||
import (
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
// Legend returns a legend renderable function.
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestLegend(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestLinearRegressionSeries(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestLogRangeTranslate(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -3,7 +3,7 @@ package matrix
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package matrix
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestPoly(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestPercentageDifferenceSeries(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestPieChart(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/matrix"
|
||||
"git.smarteching.com/zeni/go-chart/v2/matrix"
|
||||
)
|
||||
|
||||
// Interface Assertions.
|
||||
|
|
|
@ -3,8 +3,8 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/matrix"
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/matrix"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestPolynomialRegression(t *testing.T) {
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"io"
|
||||
"math"
|
||||
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
// PNG returns a new png/raster renderer.
|
||||
|
|
|
@ -3,8 +3,8 @@ package chart
|
|||
import (
|
||||
"io"
|
||||
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
// Renderer represents the basic methods required to draw a chart.
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestSeqEach(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
type mockValuesProvider struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestSplitCSV(t *testing.T) {
|
||||
|
|
2
style.go
2
style.go
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -3,9 +3,9 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestStyleIsZero(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestTextWrapWord(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestGenerateContinuousTicks(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestTimeSeriesGetValue(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestBuffer(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestTimeValueFormatterWithFormat(t *testing.T) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package chart
|
||||
|
||||
import "github.com/wcharczuk/go-chart/v2/drawing"
|
||||
import "git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
|
||||
// ValuesProvider is a type that produces values.
|
||||
type ValuesProvider interface {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestValuesValues(t *testing.T) {
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
|
||||
"golang.org/x/image/font"
|
||||
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
"github.com/golang/freetype/truetype"
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
)
|
||||
|
||||
// SVG returns a new png/raster renderer.
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestVectorRendererPath(t *testing.T) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package chart
|
||||
|
||||
import "github.com/wcharczuk/go-chart/v2/drawing"
|
||||
import "git.smarteching.com/zeni/go-chart/v2/drawing"
|
||||
|
||||
var viridisColors = [256]drawing.Color{
|
||||
{R: 0x44, G: 0x1, B: 0x54, A: 0xff},
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestXAxisGetTicks(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package chart
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wcharczuk/go-chart/v2/testutil"
|
||||
"git.smarteching.com/zeni/go-chart/v2/testutil"
|
||||
)
|
||||
|
||||
func TestYAxisGetTicks(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue