Skip to content

Commit a912977

Browse files
author
Max Streese
committed
Add 'Scene' layout feature
1 parent aedfb46 commit a912977

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

core/shared/src/main/scala/plotly/layout/Layout.scala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import dataclass.data
3232
bargap: Option[Double],
3333
bargroupgap: Option[Double],
3434
hovermode: Option[HoverMode],
35-
boxmode: Option[BoxMode]
35+
boxmode: Option[BoxMode],
36+
scene: Option[Scene]
37+
3638
)
3739

3840
object Layout {
@@ -62,7 +64,8 @@ object Layout {
6264
bargap: JDouble = null,
6365
bargroupgap: JDouble = null,
6466
hovermode: HoverMode = null,
65-
boxmode: BoxMode = null
67+
boxmode: BoxMode = null,
68+
scene: Scene = null
6669
): Layout =
6770
new Layout(
6871
Option(title),
@@ -90,6 +93,7 @@ object Layout {
9093
Option(bargap).map(x => x),
9194
Option(bargroupgap).map(x => x),
9295
Option(hovermode),
93-
Option(boxmode)
96+
Option(boxmode),
97+
Option(scene)
9498
)
9599
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package plotly
2+
package layout
3+
4+
import java.lang.{ Integer => JInt, Double => JDouble, Boolean => JBoolean }
5+
6+
import dataclass.data
7+
import plotly.element._
8+
9+
@data class Scene(
10+
xaxis: Option[Axis],
11+
yaxis: Option[Axis],
12+
zaxis: Option[Axis]
13+
)
14+
15+
object Scene {
16+
def apply(
17+
xaxis: Axis = null,
18+
yaxis: Axis = null,
19+
zaxis: Axis = null
20+
): Scene = new Scene(
21+
Option(xaxis),
22+
Option(yaxis),
23+
Option(zaxis)
24+
)
25+
}

0 commit comments

Comments
 (0)