You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
many of our plotting methods take Object and then dispatch on the type.
they should declare the most specific types possible, and have multiple methods to get our polymorphic behavior.
here's an example of a previous fix like this: #6142
we need to apply the same idea in these places (copying Joe's comment):
Since you asked .... Here's what a quick grep turns up for setters taking Object:
setBase in CategoryStems, CategoryArea, CategoryBars, BasedXYGraphics
setStyle in CategoryStems, CategoryLines, Stems
setSize in CategoryPoints, Points
setShape in CategoryPoints, Points
setFill in CategoryPoints, CategoryArea, CategoryBars, Points
setOutlineColor in CategoryPoints, CategoryArea, CategoryBars, Bars, Points
setWidth in CategoryArea, CategoryBars, Bars
setDrawOutline in CategoryArea, CategoryBars
setX in ConstantLine, Text
setData in Histogram
setValue in CategoryGraphics takes an array of Objects, expecting it to be an array of either array of Number or List of Number, if I'm following the code correctly. Since arrays are not generic, those could be successfully overloaded without hitting type erasure problems.
Setters taking a List of Objects, however, which includes some of the color-related ones that result from adding overloads and setX in XYGraphics and ConstantBand, can't be turned into overloads because of type erasure.
I'm not sure what to make of setItemLabel in CategoryGraphics or setToolTip in XYGraphics. I'm happy to ignore them for now.
The text was updated successfully, but these errors were encountered:
I think that covers it for plotting, except for AbstractChart.setYBound and XYChart.setXBound taking a bare List that looks like it should be List<Number>.
many of our plotting methods take Object and then dispatch on the type.
they should declare the most specific types possible, and have multiple methods to get our polymorphic behavior.
here's an example of a previous fix like this: #6142
we need to apply the same idea in these places (copying Joe's comment):
Since you asked .... Here's what a quick grep turns up for setters taking Object:
setBase
inCategoryStems
,CategoryArea
,CategoryBars
,BasedXYGraphics
setStyle
inCategoryStems
,CategoryLines
,Stems
setSize
inCategoryPoints
,Points
setShape
inCategoryPoints
,Points
setFill
inCategoryPoints
,CategoryArea
,CategoryBars
,Points
setOutlineColor
inCategoryPoints
,CategoryArea
,CategoryBars
,Bars
,Points
setWidth
inCategoryArea
,CategoryBars
,Bars
setDrawOutline
inCategoryArea
,CategoryBars
setX
inConstantLine
,Text
setData
inHistogram
setValue
inCategoryGraphics
takes an array of Objects, expecting it to be an array of either array of Number or List of Number, if I'm following the code correctly. Since arrays are not generic, those could be successfully overloaded without hitting type erasure problems.Setters taking a List of Objects, however, which includes some of the color-related ones that result from adding overloads and
setX
inXYGraphics
andConstantBand
, can't be turned into overloads because of type erasure.I'm not sure what to make of
setItemLabel
inCategoryGraphics
orsetToolTip
inXYGraphics
. I'm happy to ignore them for now.The text was updated successfully, but these errors were encountered: