diff --git a/generated/v2.19.0/graph_objects/plotly_gen.go b/generated/v2.19.0/graph_objects/plotly_gen.go index 4158d9f..b45d243 100644 --- a/generated/v2.19.0/graph_objects/plotly_gen.go +++ b/generated/v2.19.0/graph_objects/plotly_gen.go @@ -17,6 +17,12 @@ type Trace interface { // Traces is a slice of Traces type Traces []Trace +type Frame struct { + Name string `json:"name"` + Data []Trace `json:"data"` + Layout interface{} `json:"layout"` //'Layout properties which this frame modifies. The format is identical to the normal layout definition.' +} + // Fig is the base type for figures. type Fig struct { // Data The data to be plotted is described in an array usually called data, whose elements are trace objects of various types (e.g. scatter, bar etc) as documented in the Full Reference. @@ -33,6 +39,9 @@ type Fig struct { // Animation is not yet implemented, feel free to insert custom a struct Animation interface{} `json:"animation,omitempty"` + + // Frames is not yet implemented, feel free to insert custom a struct + Frames []Frame `json:"frames,omitempty"` } // AddTraces Is a shorthand to add figures to a given figure. It handles the case where the Traces value is nil. @@ -44,6 +53,7 @@ func (fig *Fig) AddTraces(traces ...Trace) { } // UnmarshalJSON is a custom unmarshal function to properly handle special cases. +// unmarshal skips frames and animations func (fig *Fig) UnmarshalJSON(data []byte) error { var err error tmp := unmarshalFig{} @@ -66,9 +76,11 @@ func (fig *Fig) UnmarshalJSON(data []byte) error { } type unmarshalFig struct { - Data []json.RawMessage `json:"data,omitempty"` - Layout *Layout `json:"layout,omitempty"` - Config *Config `json:"config,omitempty"` + Data []json.RawMessage `json:"data,omitempty"` + Layout *Layout `json:"layout,omitempty"` + Config *Config `json:"config,omitempty"` + Animation interface{} `json:"animation,omitempty"` + Frames []Frame `json:"frames,omitempty"` } // Bool represents a *bool value. Needed to tell the differenc between false and nil. diff --git a/generated/v2.29.1/graph_objects/plotly_gen.go b/generated/v2.29.1/graph_objects/plotly_gen.go index 4158d9f..b45d243 100644 --- a/generated/v2.29.1/graph_objects/plotly_gen.go +++ b/generated/v2.29.1/graph_objects/plotly_gen.go @@ -17,6 +17,12 @@ type Trace interface { // Traces is a slice of Traces type Traces []Trace +type Frame struct { + Name string `json:"name"` + Data []Trace `json:"data"` + Layout interface{} `json:"layout"` //'Layout properties which this frame modifies. The format is identical to the normal layout definition.' +} + // Fig is the base type for figures. type Fig struct { // Data The data to be plotted is described in an array usually called data, whose elements are trace objects of various types (e.g. scatter, bar etc) as documented in the Full Reference. @@ -33,6 +39,9 @@ type Fig struct { // Animation is not yet implemented, feel free to insert custom a struct Animation interface{} `json:"animation,omitempty"` + + // Frames is not yet implemented, feel free to insert custom a struct + Frames []Frame `json:"frames,omitempty"` } // AddTraces Is a shorthand to add figures to a given figure. It handles the case where the Traces value is nil. @@ -44,6 +53,7 @@ func (fig *Fig) AddTraces(traces ...Trace) { } // UnmarshalJSON is a custom unmarshal function to properly handle special cases. +// unmarshal skips frames and animations func (fig *Fig) UnmarshalJSON(data []byte) error { var err error tmp := unmarshalFig{} @@ -66,9 +76,11 @@ func (fig *Fig) UnmarshalJSON(data []byte) error { } type unmarshalFig struct { - Data []json.RawMessage `json:"data,omitempty"` - Layout *Layout `json:"layout,omitempty"` - Config *Config `json:"config,omitempty"` + Data []json.RawMessage `json:"data,omitempty"` + Layout *Layout `json:"layout,omitempty"` + Config *Config `json:"config,omitempty"` + Animation interface{} `json:"animation,omitempty"` + Frames []Frame `json:"frames,omitempty"` } // Bool represents a *bool value. Needed to tell the differenc between false and nil. diff --git a/generated/v2.31.1/graph_objects/plotly_gen.go b/generated/v2.31.1/graph_objects/plotly_gen.go index 4158d9f..b45d243 100644 --- a/generated/v2.31.1/graph_objects/plotly_gen.go +++ b/generated/v2.31.1/graph_objects/plotly_gen.go @@ -17,6 +17,12 @@ type Trace interface { // Traces is a slice of Traces type Traces []Trace +type Frame struct { + Name string `json:"name"` + Data []Trace `json:"data"` + Layout interface{} `json:"layout"` //'Layout properties which this frame modifies. The format is identical to the normal layout definition.' +} + // Fig is the base type for figures. type Fig struct { // Data The data to be plotted is described in an array usually called data, whose elements are trace objects of various types (e.g. scatter, bar etc) as documented in the Full Reference. @@ -33,6 +39,9 @@ type Fig struct { // Animation is not yet implemented, feel free to insert custom a struct Animation interface{} `json:"animation,omitempty"` + + // Frames is not yet implemented, feel free to insert custom a struct + Frames []Frame `json:"frames,omitempty"` } // AddTraces Is a shorthand to add figures to a given figure. It handles the case where the Traces value is nil. @@ -44,6 +53,7 @@ func (fig *Fig) AddTraces(traces ...Trace) { } // UnmarshalJSON is a custom unmarshal function to properly handle special cases. +// unmarshal skips frames and animations func (fig *Fig) UnmarshalJSON(data []byte) error { var err error tmp := unmarshalFig{} @@ -66,9 +76,11 @@ func (fig *Fig) UnmarshalJSON(data []byte) error { } type unmarshalFig struct { - Data []json.RawMessage `json:"data,omitempty"` - Layout *Layout `json:"layout,omitempty"` - Config *Config `json:"config,omitempty"` + Data []json.RawMessage `json:"data,omitempty"` + Layout *Layout `json:"layout,omitempty"` + Config *Config `json:"config,omitempty"` + Animation interface{} `json:"animation,omitempty"` + Frames []Frame `json:"frames,omitempty"` } // Bool represents a *bool value. Needed to tell the differenc between false and nil. diff --git a/generator/templates/plotly.tmpl b/generator/templates/plotly.tmpl index 1d25df5..dfbd787 100644 --- a/generator/templates/plotly.tmpl +++ b/generator/templates/plotly.tmpl @@ -18,6 +18,12 @@ type Trace interface { // Traces is a slice of Traces type Traces []Trace +type Frame struct { + Name string `json:"name"` + Data []Trace `json:"data"` + Layout interface{} `json:"layout"` //'Layout properties which this frame modifies. The format is identical to the normal layout definition.' +} + // Fig is the base type for figures. type Fig struct { // Data The data to be plotted is described in an array usually called data, whose elements are trace objects of various types (e.g. scatter, bar etc) as documented in the Full Reference. @@ -34,6 +40,9 @@ type Fig struct { // Animation is not yet implemented, feel free to insert custom a struct Animation interface{} `json:"animation,omitempty"` + + // Frames is not yet implemented, feel free to insert custom a struct + Frames []Frame `json:"frames,omitempty"` } // AddTraces Is a shorthand to add figures to a given figure. It handles the case where the Traces value is nil. @@ -45,6 +54,7 @@ func (fig *Fig) AddTraces(traces ...Trace) { } // UnmarshalJSON is a custom unmarshal function to properly handle special cases. +// unmarshal skips frames and animations func (fig *Fig) UnmarshalJSON(data []byte) error { var err error tmp := unmarshalFig{} @@ -67,9 +77,11 @@ func (fig *Fig) UnmarshalJSON(data []byte) error { } type unmarshalFig struct { - Data []json.RawMessage `json:"data,omitempty"` - Layout *Layout `json:"layout,omitempty"` - Config *Config `json:"config,omitempty"` + Data []json.RawMessage `json:"data,omitempty"` + Layout *Layout `json:"layout,omitempty"` + Config *Config `json:"config,omitempty"` + Animation interface{} `json:"animation,omitempty"` + Frames []Frame `json:"frames,omitempty"` } // Bool represents a *bool value. Needed to tell the differenc between false and nil.