Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MetalBlueberry committed Aug 26, 2024
1 parent f2a74a5 commit ff7eeb8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions examples/animation/animation.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ func main() {
},
Updatemenus: []grob.LayoutUpdatemenu{
{
Type: grob.UpdatemenuTypeButtons,
Type: grob.LayoutUpdatemenuTypeButtons,
Showactive: types.False,
Buttons: []grob.UpdatemenuButton{
Buttons: []grob.LayoutUpdatemenuButton{
{
Label: types.S("Play"),
Method: grob.ButtonMethodAnimate,
Method: grob.LayoutUpdatemenuButtonMethodAnimate,
Args: []*ButtonArgs{
nil,
{
Expand Down
4 changes: 2 additions & 2 deletions examples/bar.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

<head>
<script src="https://cdn.plot.ly/plotly-2.34.0.min.js"></script>
<script src="https://cdn.plot.ly/plotly-2.31.1.min.js"></script>
</head>
<body>
<div id="plot"></div>
<script>
data = JSON.parse(atob('eyJkYXRhIjpbeyJ0eXBlIjoiYmFyIiwieCI6WzEsMiwzXSwieSI6WzEsMiwzXX1dLCJsYXlvdXQiOnsidGl0bGUiOnsic3VidGl0bGUiOnsidGV4dCI6IkFtYXppbmcifSwidGV4dCI6IkEgRmlndXJlIFNwZWNpZmllZCBCeSBHbyBTdHJ1Y3QifX19'))
data = JSON.parse(atob('eyJkYXRhIjpbeyJ0eXBlIjoiYmFyIiwieCI6WzEsMiwzXSwieSI6WzEsMiwzXX1dLCJsYXlvdXQiOnsidGl0bGUiOnsidGV4dCI6IkEgRmlndXJlIFNwZWNpZmllZCBCeSBHbyBTdHJ1Y3QifX19'))
Plotly.newPlot('plot', data);
</script>
</body>
Expand Down
1 change: 1 addition & 0 deletions examples/bar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ func main() {

offline.ToHtml(fig, "bar.html")
offline.Show(fig)
offline.Serve(fig)
}
6 changes: 3 additions & 3 deletions examples/shapes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {
Y0: 0,
X1: 1,
Y1: 2,
Line: &grob.ShapeLine{
Line: &grob.LayoutShapeLine{
Color: "RoyalBlue",
Width: types.N(3),
},
Expand All @@ -38,7 +38,7 @@ func main() {
Y0: 2,
X1: 5,
Y1: 2,
Line: &grob.ShapeLine{
Line: &grob.LayoutShapeLine{
Color: "LightSeaGreen",
Width: types.N(4),
Dash: types.S(string(grob.Scatter3dLineDashDashdot)),
Expand All @@ -50,7 +50,7 @@ func main() {
Y0: 0,
X1: 6,
Y1: 2,
Line: &grob.ShapeLine{
Line: &grob.LayoutShapeLine{
Color: "MediumPurple",
Width: types.N(4),
Dash: types.S(string(grob.Scatter3dLineDashDot)),
Expand Down
2 changes: 1 addition & 1 deletion examples/waterfall_bar_chart/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func main() {
X: xData[i],
Y: yData[i],
Text: types.S(textList[i]),
Font: &grob.AnnotationFont{
Font: &grob.LayoutAnnotationFont{
Family: types.S("Arial"),
Size: types.N(14),
Color: "rgba(245,246,249,1)",
Expand Down

0 comments on commit ff7eeb8

Please sign in to comment.