Hi,
I have created a macro with a dynamic histogram. Histogram dynamically changes based on which data set the user selects. The histogram includes 2 key features: A vertical line for MEDIAN and a separate for MEAN. The way I do this is with a Scatter Plot with Smooth Line - I only compute the min + max values for the Y-axis, and then the MEAN and MEDIAN are used for the X-axis.
Problem I am having is that when I dynamically change the data set, the vertical lines are no longer correctly on the PRIMARY axis. However, if i hover my mouse over them, they appear to be correct.
Please see the attached images. The first image depicts the one data set, where i designed the chart. The next data set is dynamically changed and results in improperly placed vertical lines.
Thank you!!
P.S. would prefer not to post my macro, as i'd like to keep it private.
Right.PNG
Wrong.PNG
Chart Types.PNG
Bookmarks