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
Is there a way to render a chart with just one axis? I see ChartCoordsSpaceLeftBottomSingleAxis, ChartCoordsSpaceLeftTopSingleAxis, ChartCoordsSpaceRightBottomSingleAxis, and ChartCoordsSpaceRightTopSingleAxis, but no version with no vertical axis.
It looks like ChartBarsLayer requires both axis. Would it be possible to make them optional?
The text was updated successfully, but these errors were encountered:
To remove the reserved space you have to set related spacing settings to 0 and don't pass any text to the axis. In detail:
Set labelsToAxisSpacingY, spacingBetweenAxesY, labelsSpacing and axisTitleLabelsToLabelsSpacing to 0. (Just noticed that the later should be specific to each axis, or at least not be used when you don't pass a title / in fact all these settings should be conditional - right now this affects also the other axes, though it looks ok. You also can change the value of leading to compensate for this).
Don't pass an axis title: let yModel = ChartAxisModel(axisValues: yValues, axisTitleLabels: [])
Finally, use axis labels that don't display text (otherwise the max label width will be reserved). For this you can use this custom class:
Is there a way to render a chart with just one axis? I see
ChartCoordsSpaceLeftBottomSingleAxis
,ChartCoordsSpaceLeftTopSingleAxis
,ChartCoordsSpaceRightBottomSingleAxis
, andChartCoordsSpaceRightTopSingleAxis
, but no version with no vertical axis.It looks like
ChartBarsLayer
requires both axis. Would it be possible to make them optional?The text was updated successfully, but these errors were encountered: