Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions plotly/plotlyfig_aux/handlegraphics/updateBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
% outliercolor: ...[NA]
% outlierwidth: ...[NA]

%---------------------------------------------------------------------%

%-AXIS INDEX-%
axIndex = obj.getAxisIndex(obj.State.Plot(barIndex).AssociatedAxis);

Expand All @@ -52,29 +50,21 @@
%-CHECK FOR MULTIPLE AXES-%
[xSource, ySource] = findSourceAxis(obj, axIndex);

%---------------------------------------------------------------------%

%-associate axis-%
obj.data{barIndex}.xaxis = "x" + xSource;
obj.data{barIndex}.yaxis = "y" + ySource;

%---------------------------------------------------------------------%

%-set trace-%
obj.data{barIndex}.type = "bar";
obj.data{barIndex}.name = barData.DisplayName;
obj.data{barIndex}.visible = strcmp(barData.Visible,"on");

%---------------------------------------------------------------------%

%-set plot data-%
xData = barData.XData;
yData = barData.YData;

if isduration(xData) || isdatetime(xData)
if isdatetime(xData)
xData = datenum(xData);
end
if isduration(yData) || isdatetime(yData)
if isdatetime(yData)
yData = datenum(yData);
end

Expand All @@ -89,16 +79,12 @@
obj.data{barIndex}.y = xData;
end

%---------------------------------------------------------------------%

%-trace settings-%
markerline = extractAreaLine(barData);

obj.data{barIndex}.marker = extractAreaFace(barData);
obj.data{barIndex}.marker.line = markerline;

%---------------------------------------------------------------------%

%-layout settings-%
obj.layout.bargroupgap = 1-barData.BarWidth;

Expand All @@ -118,8 +104,6 @@
obj.layout.barmode = "relative";
end

%---------------------------------------------------------------------%

%-bar showlegend-%
leg = barData.Annotation;
legInfo = leg.LegendInformation;
Expand Down