Skip to content

Commit

Permalink
chore: deprecate legend in favor of staticLegend (#12)
Browse files Browse the repository at this point in the history
Co-authored-by: Timmy Luong <TCL735@users.noreply.github.com>
  • Loading branch information
glinton and TCL735 committed Apr 16, 2021
1 parent 4db17ed commit c2d3611
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 15 deletions.
35 changes: 30 additions & 5 deletions contracts/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8806,7 +8806,6 @@ components:
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
- position
Expand Down Expand Up @@ -8837,6 +8836,8 @@ components:
type: boolean
axes:
$ref: '#/components/schemas/Axes'
staticLegend:
$ref: '#/components/schemas/StaticLegend'
legend:
$ref: '#/components/schemas/Legend'
xColumn:
Expand Down Expand Up @@ -8907,7 +8908,6 @@ components:
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
properties:
Expand Down Expand Up @@ -8939,6 +8939,8 @@ components:
$ref: '#/components/schemas/Axes'
legend:
$ref: '#/components/schemas/Legend'
staticLegend:
$ref: '#/components/schemas/StaticLegend'
xColumn:
type: string
generateXAxisTicks:
Expand Down Expand Up @@ -8997,7 +8999,6 @@ components:
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
- prefix
Expand Down Expand Up @@ -9031,6 +9032,8 @@ components:
type: boolean
axes:
$ref: '#/components/schemas/Axes'
staticLegend:
$ref: '#/components/schemas/StaticLegend'
legend:
$ref: '#/components/schemas/Legend'
xColumn:
Expand Down Expand Up @@ -9425,7 +9428,6 @@ components:
- tickPrefix
- suffix
- tickSuffix
- legend
- decimalPlaces
properties:
type:
Expand Down Expand Up @@ -9458,6 +9460,8 @@ components:
type: string
tickSuffix:
type: string
staticLegend:
$ref: '#/components/schemas/StaticLegend'
legend:
$ref: '#/components/schemas/Legend'
decimalPlaces:
Expand Down Expand Up @@ -9540,7 +9544,6 @@ components:
- tickPrefix
- suffix
- tickSuffix
- legend
- decimalPlaces
properties:
type:
Expand Down Expand Up @@ -9573,6 +9576,8 @@ components:
type: string
tickSuffix:
type: string
staticLegend:
$ref: '#/components/schemas/StaticLegend'
legend:
$ref: '#/components/schemas/Legend'
decimalPlaces:
Expand Down Expand Up @@ -9902,9 +9907,29 @@ components:
$ref: '#/components/schemas/Axis'
'y':
$ref: '#/components/schemas/Axis'
StaticLegend:
description: StaticLegend represents the options specific to the static legend
type: object
properties:
colorizeRows:
type: boolean
heightRatio:
type: number
format: float
opacity:
type: number
format: float
orientationThreshold:
type: integer
valueAxis:
type: string
widthRatio:
type: number
format: float
Legend:
description: Legend define encoding of data into a view's legend
type: object
deprecated: true
properties:
type:
description: The style of the legend.
Expand Down
35 changes: 30 additions & 5 deletions contracts/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8855,7 +8855,6 @@ components:
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
- position
Expand Down Expand Up @@ -8886,6 +8885,8 @@ components:
type: boolean
axes:
$ref: '#/components/schemas/Axes'
staticLegend:
$ref: '#/components/schemas/StaticLegend'
legend:
$ref: '#/components/schemas/Legend'
xColumn:
Expand Down Expand Up @@ -8956,7 +8957,6 @@ components:
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
properties:
Expand Down Expand Up @@ -8988,6 +8988,8 @@ components:
$ref: '#/components/schemas/Axes'
legend:
$ref: '#/components/schemas/Legend'
staticLegend:
$ref: '#/components/schemas/StaticLegend'
xColumn:
type: string
generateXAxisTicks:
Expand Down Expand Up @@ -9046,7 +9048,6 @@ components:
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
- prefix
Expand Down Expand Up @@ -9080,6 +9081,8 @@ components:
type: boolean
axes:
$ref: '#/components/schemas/Axes'
staticLegend:
$ref: '#/components/schemas/StaticLegend'
legend:
$ref: '#/components/schemas/Legend'
xColumn:
Expand Down Expand Up @@ -9474,7 +9477,6 @@ components:
- tickPrefix
- suffix
- tickSuffix
- legend
- decimalPlaces
properties:
type:
Expand Down Expand Up @@ -9507,6 +9509,8 @@ components:
type: string
tickSuffix:
type: string
staticLegend:
$ref: '#/components/schemas/StaticLegend'
legend:
$ref: '#/components/schemas/Legend'
decimalPlaces:
Expand Down Expand Up @@ -9589,7 +9593,6 @@ components:
- tickPrefix
- suffix
- tickSuffix
- legend
- decimalPlaces
properties:
type:
Expand Down Expand Up @@ -9622,6 +9625,8 @@ components:
type: string
tickSuffix:
type: string
staticLegend:
$ref: '#/components/schemas/StaticLegend'
legend:
$ref: '#/components/schemas/Legend'
decimalPlaces:
Expand Down Expand Up @@ -9951,9 +9956,29 @@ components:
$ref: '#/components/schemas/Axis'
'y':
$ref: '#/components/schemas/Axis'
StaticLegend:
description: StaticLegend represents the options specific to the static legend
type: object
properties:
colorizeRows:
type: boolean
heightRatio:
type: number
format: float
opacity:
type: number
format: float
orientationThreshold:
type: integer
valueAxis:
type: string
widthRatio:
type: number
format: float
Legend:
description: Legend define encoding of data into a view's legend
type: object
deprecated: true
properties:
type:
description: The style of the legend.
Expand Down
2 changes: 2 additions & 0 deletions src/common/_schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@
$ref: "./common/schemas/GeoViewProperties.yml"
Axes:
$ref: "./common/schemas/Axes.yml"
StaticLegend:
$ref: "./common/schemas/StaticLegend.yml"
Legend:
$ref: "./common/schemas/Legend.yml"
DecimalPlaces:
Expand Down
3 changes: 2 additions & 1 deletion src/common/schemas/BandViewProperties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
properties:
Expand Down Expand Up @@ -36,6 +35,8 @@
$ref: "./Axes.yml"
legend:
$ref: "./Legend.yml"
staticLegend:
$ref: "./StaticLegend.yml"
xColumn:
type: string
generateXAxisTicks:
Expand Down
3 changes: 2 additions & 1 deletion src/common/schemas/GaugeViewProperties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
tickPrefix,
suffix,
tickSuffix,
legend,
decimalPlaces,
]
properties:
Expand Down Expand Up @@ -43,6 +42,8 @@
type: string
tickSuffix:
type: string
staticLegend:
$ref: "./StaticLegend.yml"
legend:
$ref: "./Legend.yml"
decimalPlaces:
Expand Down
1 change: 1 addition & 0 deletions src/common/schemas/Legend.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
description: Legend define encoding of data into a view's legend
type: object
deprecated: true
properties:
type:
description: The style of the legend.
Expand Down
3 changes: 2 additions & 1 deletion src/common/schemas/LinePlusSingleStatProperties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
- prefix
Expand Down Expand Up @@ -37,6 +36,8 @@
type: boolean
axes:
$ref: "./Axes.yml"
staticLegend:
$ref: "./StaticLegend.yml"
legend:
$ref: "./Legend.yml"
xColumn:
Expand Down
3 changes: 2 additions & 1 deletion src/common/schemas/SingleStatViewProperties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
- tickPrefix
- suffix
- tickSuffix
- legend
- decimalPlaces
properties:
type:
Expand Down Expand Up @@ -41,6 +40,8 @@
type: string
tickSuffix:
type: string
staticLegend:
$ref: "./StaticLegend.yml"
legend:
$ref: "./Legend.yml"
decimalPlaces:
Expand Down
18 changes: 18 additions & 0 deletions src/common/schemas/StaticLegend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: StaticLegend represents the options specific to the static legend
type: object
properties:
colorizeRows:
type: boolean
heightRatio:
type: number
format: float
opacity:
type: number
format: float
orientationThreshold:
type: integer
valueAxis:
type: string
widthRatio:
type: number
format: float
3 changes: 2 additions & 1 deletion src/common/schemas/XYViewProperties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- shape
- axes
- colors
- legend
- note
- showNoteWhenEmpty
- position
Expand Down Expand Up @@ -35,6 +34,8 @@
type: boolean
axes:
$ref: "./Axes.yml"
staticLegend:
$ref: "./StaticLegend.yml"
legend:
$ref: "./Legend.yml"
xColumn:
Expand Down

0 comments on commit c2d3611

Please sign in to comment.