@@ -12,7 +12,8 @@ Marker::Marker(const Options &options,
1212 ChannelsStats &stats,
1313 const Data::MultiIndex &index,
1414 MarkerIndex idx,
15- bool needMarkerInfo) :
15+ bool needMarkerInfo,
16+ bool rectangleSpacing) :
1617 enabled (data.empty() || !index.isEmpty()),
1718 cellInfo (enabled || needMarkerInfo
1819 ? data.cellInfo(index, idx, needMarkerInfo)
@@ -75,7 +76,12 @@ Marker::Marker(const Options &options,
7576 index,
7677 horizontal ? &mainId->value : subAxisId);
7778
78- spacing.x = (horizontal || (lineOrCircle && !polar))
79+ spacing.x = (horizontal || (lineOrCircle && !polar)
80+ || (channels.at (ChannelId::y).isDimension ()
81+ && channels.at (ChannelId::y).hasDimension ()
82+ && options.geometry == ShapeType::rectangle
83+ && options.align != Base::Align::Type::stretch
84+ && rectangleSpacing))
7985 && options.getChannels ().anyAxisSet ()
8086 && channels.at (ChannelId::x).isDimension ()
8187 ? 1
@@ -88,7 +94,12 @@ Marker::Marker(const Options &options,
8894 index,
8995 !horizontal ? &mainId->value : subAxisId);
9096
91- spacing.y = (!horizontal || lineOrCircle)
97+ spacing.y = (!horizontal || lineOrCircle
98+ || (channels.at (ChannelId::x).isDimension ()
99+ && channels.at (ChannelId::y).hasDimension ()
100+ && options.geometry == ShapeType::rectangle
101+ && options.align != Base::Align::Type::stretch
102+ && rectangleSpacing))
92103 && options.getChannels ().anyAxisSet ()
93104 && channels.at (ChannelId::y).isDimension ()
94105 ? 1
0 commit comments