Looks like we can't reproduce the issue or there's a problem in the test case provided.
-
Sencha Premium Member
Scatter series renderers incorrect when the store only has a single item.
Ext version tested:
Browser versions tested against:
DOCTYPE tested against:
Description:
- It a store has only a single item the plots created by the scatter series don't appear on the chart rendering area.
Steps to reproduce the problem:
- Create a chart with a scatter series and assign it a store with a single record in it.
The result that was expected:
- The scatter series should renderer the plots the left vertical axis.
The result that occurs instead:
- The scatter series renders the plots on the far left of it's bounds, outside the defined axes.
HELPFUL INFORMATION
Debugging already done:
- This bug is due to Ininity being returned for the xScale value from the scatter series getBounds() function.
Possible fix;
- Check whether any of the scaler values are Infinity and set then to the corresponding bbox measurement.
return {
bbox: bbox,
minX: minX,
minY: minY,
xScale: xScale == Infinity ? bbox.width : xScale,
yScale: yScale == Infinity ? bbox.height : yScale
};
-
Thanks for the report! I have opened a bug in our bug tracker.
-
Sencha Premium Member
scatter series when the store has a single item
-
Sencha Premium Member
Hi,
Where I should write this code to avoid the problem with a store that has only one record?
return {
bbox: bbox,
minX: minX,
minY: minY,
xScale: xScale == Infinity ? bbox.width : xScale,
yScale: yScale == Infinity ? bbox.height : yScale
};
Thanks
Ozlem
-
Sencha User
Hi, Is this resolved? Can anybody provide a workaround?