Skip to content

Commit ff7eeb8

Browse files
Fix examples
1 parent f2a74a5 commit ff7eeb8

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

examples/animation/animation.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ func main() {
5959
},
6060
Updatemenus: []grob.LayoutUpdatemenu{
6161
{
62-
Type: grob.UpdatemenuTypeButtons,
62+
Type: grob.LayoutUpdatemenuTypeButtons,
6363
Showactive: types.False,
64-
Buttons: []grob.UpdatemenuButton{
64+
Buttons: []grob.LayoutUpdatemenuButton{
6565
{
6666
Label: types.S("Play"),
67-
Method: grob.ButtonMethodAnimate,
67+
Method: grob.LayoutUpdatemenuButtonMethodAnimate,
6868
Args: []*ButtonArgs{
6969
nil,
7070
{

examples/bar.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
<head>
3-
<script src="https://cdn.plot.ly/plotly-2.34.0.min.js"></script>
3+
<script src="https://cdn.plot.ly/plotly-2.31.1.min.js"></script>
44
</head>
55
<body>
66
<div id="plot"></div>
77
<script>
8-
data = JSON.parse(atob('eyJkYXRhIjpbeyJ0eXBlIjoiYmFyIiwieCI6WzEsMiwzXSwieSI6WzEsMiwzXX1dLCJsYXlvdXQiOnsidGl0bGUiOnsic3VidGl0bGUiOnsidGV4dCI6IkFtYXppbmcifSwidGV4dCI6IkEgRmlndXJlIFNwZWNpZmllZCBCeSBHbyBTdHJ1Y3QifX19'))
8+
data = JSON.parse(atob('eyJkYXRhIjpbeyJ0eXBlIjoiYmFyIiwieCI6WzEsMiwzXSwieSI6WzEsMiwzXX1dLCJsYXlvdXQiOnsidGl0bGUiOnsidGV4dCI6IkEgRmlndXJlIFNwZWNpZmllZCBCeSBHbyBTdHJ1Y3QifX19'))
99
Plotly.newPlot('plot', data);
1010
</script>
1111
</body>

examples/bar/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ func main() {
3131

3232
offline.ToHtml(fig, "bar.html")
3333
offline.Show(fig)
34+
offline.Serve(fig)
3435
}

examples/shapes/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func main() {
2727
Y0: 0,
2828
X1: 1,
2929
Y1: 2,
30-
Line: &grob.ShapeLine{
30+
Line: &grob.LayoutShapeLine{
3131
Color: "RoyalBlue",
3232
Width: types.N(3),
3333
},
@@ -38,7 +38,7 @@ func main() {
3838
Y0: 2,
3939
X1: 5,
4040
Y1: 2,
41-
Line: &grob.ShapeLine{
41+
Line: &grob.LayoutShapeLine{
4242
Color: "LightSeaGreen",
4343
Width: types.N(4),
4444
Dash: types.S(string(grob.Scatter3dLineDashDashdot)),
@@ -50,7 +50,7 @@ func main() {
5050
Y0: 0,
5151
X1: 6,
5252
Y1: 2,
53-
Line: &grob.ShapeLine{
53+
Line: &grob.LayoutShapeLine{
5454
Color: "MediumPurple",
5555
Width: types.N(4),
5656
Dash: types.S(string(grob.Scatter3dLineDashDot)),

examples/waterfall_bar_chart/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func main() {
179179
X: xData[i],
180180
Y: yData[i],
181181
Text: types.S(textList[i]),
182-
Font: &grob.AnnotationFont{
182+
Font: &grob.LayoutAnnotationFont{
183183
Family: types.S("Arial"),
184184
Size: types.N(14),
185185
Color: "rgba(245,246,249,1)",

0 commit comments

Comments
 (0)