Skip to content

Commit b83a081

Browse files
Fix removing Traces type
1 parent 8018f9a commit b83a081

File tree

13 files changed

+23
-15
lines changed

13 files changed

+23
-15
lines changed

examples/bar/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
grob "github.com/MetalBlueberry/go-plotly/generated/v2.31.1/graph_objects"
55
"github.com/MetalBlueberry/go-plotly/pkg/offline"
6+
"github.com/MetalBlueberry/go-plotly/pkg/types"
67
)
78

89
func main() {
@@ -15,7 +16,7 @@ func main() {
1516
})
1617
*/
1718
fig := &grob.Fig{
18-
Data: grob.Traces{
19+
Data: []types.Trace{
1920
&grob.Bar{
2021
X: []float64{1, 2, 3},
2122
Y: []float64{1, 2, 3},

examples/bar_custom/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func main() {
7676
}
7777

7878
fig := &grob.Fig{
79-
Data: grob.Traces{trace1},
79+
Data: []types.Trace{trace1},
8080
Layout: layout,
8181
}
8282

examples/colorscale/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func main() {
1414
y := sin(t)
1515
z := t
1616
fig := &grob.Fig{
17-
Data: grob.Traces{
17+
Data: []types.Trace{
1818
&grob.Scatter3d{
1919
X: x,
2020
Y: y,

examples/responsive/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616
})
1717
*/
1818
fig := &grob.Fig{
19-
Data: grob.Traces{
19+
Data: []types.Trace{
2020
&grob.Bar{
2121
X: []float64{1, 2, 3},
2222
Y: []float64{1, 2, 3},

examples/scatter/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
grob "github.com/MetalBlueberry/go-plotly/generated/v2.31.1/graph_objects"
77
"github.com/MetalBlueberry/go-plotly/pkg/offline"
8+
"github.com/MetalBlueberry/go-plotly/pkg/types"
89
)
910

1011
func main() {
@@ -24,7 +25,7 @@ func main() {
2425
y := sin(t)
2526

2627
fig := &grob.Fig{
27-
Data: grob.Traces{
28+
Data: []types.Trace{
2829
&grob.Scatter{
2930
X: t,
3031
Y: y,

examples/scatter3d/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
grob "github.com/MetalBlueberry/go-plotly/generated/v2.31.1/graph_objects"
77
"github.com/MetalBlueberry/go-plotly/pkg/offline"
8+
"github.com/MetalBlueberry/go-plotly/pkg/types"
89
)
910

1011
func main() {
@@ -27,7 +28,7 @@ func main() {
2728
z := t
2829

2930
fig := &grob.Fig{
30-
Data: grob.Traces{
31+
Data: []types.Trace{
3132
&grob.Scatter3d{
3233
X: x,
3334
Y: y,

examples/stargazers/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func main() {
6767
}
6868

6969
fig := &grob.Fig{
70-
Data: grob.Traces{
70+
Data: []types.Trace{
7171
&grob.Scatter{
7272
X: x,
7373
Y: y,

examples/static_image/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"strings"
1010

1111
grob "github.com/MetalBlueberry/go-plotly/generated/v2.31.1/graph_objects"
12+
"github.com/MetalBlueberry/go-plotly/pkg/types"
1213
)
1314

1415
func main() {
@@ -21,10 +22,10 @@ func main() {
2122
})
2223
*/
2324
fig := &grob.Fig{
24-
Data: grob.Traces{
25+
Data: []types.Trace{
2526
&grob.Bar{
26-
X: []float64{1, 2, 3},
27-
Y: []float64{1, 2, 3},
27+
X: []float64{1, 2, 3},
28+
Y: []float64{1, 2, 3},
2829
},
2930
},
3031
Layout: &grob.Layout{

examples/subplots_share_axes/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
grob "github.com/MetalBlueberry/go-plotly/generated/v2.31.1/graph_objects"
55
"github.com/MetalBlueberry/go-plotly/pkg/offline"
6+
"github.com/MetalBlueberry/go-plotly/pkg/types"
67
)
78

89
func main() {
@@ -53,7 +54,7 @@ func main() {
5354
Plotly.newPlot('myDiv', data, layout);
5455
*/
5556
fig := &grob.Fig{
56-
Data: grob.Traces{
57+
Data: []types.Trace{
5758
&grob.Scatter{
5859
X: []float64{1, 2, 3},
5960
Y: []float64{2, 3, 4},

examples/transforms/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
grob "github.com/MetalBlueberry/go-plotly/generated/v2.31.1/graph_objects"
55
"github.com/MetalBlueberry/go-plotly/pkg/offline"
6+
"github.com/MetalBlueberry/go-plotly/pkg/types"
67
)
78

89
func main() {
@@ -15,7 +16,7 @@ func main() {
1516
})
1617
*/
1718
fig := &grob.Fig{
18-
Data: grob.Traces{
19+
Data: []types.Trace{
1920
&grob.Bar{
2021
X: []float64{1, 2, 3},
2122
Y: []float64{1, 2, 3},

examples/unmarshal/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ import (
66

77
grob "github.com/MetalBlueberry/go-plotly/generated/v2.31.1/graph_objects"
88
"github.com/MetalBlueberry/go-plotly/pkg/offline"
9+
"github.com/MetalBlueberry/go-plotly/pkg/types"
910
)
1011

1112
func main() {
1213
t := linspace(0, 10, 100)
1314
y := sin(t)
1415

1516
fig := &grob.Fig{
16-
Data: grob.Traces{
17+
Data: []types.Trace{
1718
&grob.Scatter{
1819
X: t,
1920
Y: y,

examples/wasm/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ import (
77
"syscall/js"
88

99
grob "github.com/MetalBlueberry/go-plotly/generated/v2.31.1/graph_objects"
10+
"github.com/MetalBlueberry/go-plotly/pkg/types"
1011
)
1112

1213
// to run this, wasm need to be set: GOOS=js GOARCH=wasm go build -o main.wasm
1314

1415
func plot(this js.Value, inputs []js.Value) interface{} {
1516
fig := &grob.Fig{
16-
Data: grob.Traces{
17+
Data: []types.Trace{
1718
&grob.Choropleth{
1819
Autocolorscale: types.True,
1920
Locationmode: grob.ChoroplethLocationmodeUSAStates,

examples/waterfall_bar_chart/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func main() {
171171
},
172172
}
173173

174-
data := grob.Traces{trace1, trace2, trace3, trace4}
174+
data := []types.Trace{trace1, trace2, trace3, trace4}
175175

176176
annotations := make([]Annotation, 7)
177177
for i := 0; i < len(annotations); i++ {

0 commit comments

Comments
 (0)