Results 1 to 9 of 9

Thread: Cannot read chart object (x,y) values when hovering mouse over chart using overlaid shapes

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Feb 2018
    Posts
    6
    Rep Power
    0

    Cannot read chart object (x,y) values when hovering mouse over chart using overlaid shapes

    I have a rather odd question.

    I needed to generate 'control charts' comprising limits -- 1, 2, and 3 standard deviations. That is no problem, I have VBA generating them dynamically, pulling data from a SQL server, computing sigma, auto-scaling plot, etc. I've worked with VBA before.

    Now I wanted to color the band within -1 sigma and +1 sigma green behind the line graph. And the next band yellow (2 sigma band), and the final band red (3 sigma band). That took some effort; I had to map plot coordinates to chart area coordinates and compute top and height. I set the rectangle shape transparent at 50% and its width that of the chart area. So I have 5 rectangles, overlaid on plot, but not overlaid atop each other. The VBA renders these rectangles perfectly. So charts look great.

    HOWEVER, I want it so when I hover mouse over points, it shows the (time/date, value) pair. I tried moving the overlaid rectangles to the back, but all it does is display a single fractional number when I hover the mouse over the points. If I move the overlaid rectangle shape so it is not overlaid with the point, I can read x,y values again when hovering mouse over points.

    Is there something I'm missing or a better way to do this? I don't know the graphic object model very well, is there some way I can set the rectangle to be more passive and not interact with the plot?

    Otherwise I'm left with the workaround of putting a button on screen to toggle between showing shaded bands and horizontal lines. When I render horizontal lines on the plot (series), of course, there are no shapes, and I can read (x,y) pairs when hovering mouse, however, it does not look as good.

    This is running in Excel 2013. Thanks!

    Also I loved the popup calendar userform I downloaded from this site recently.

    I should add that when I hover over the solid fill (but transparent) rectangle, it displays the NAME of the rectangle rather than the UNDERLYING points on the chart.

    ControlChartWithShadedBands.jpg
    Last edited by fseipel; 02-24-2019 at 04:21 PM.

Similar Threads

  1. Replies: 2
    Last Post: 01-13-2014, 07:13 PM
  2. Custom Charts in Excel :: Gauge Chart (aka Dial/Speedometer Chart)
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 08-07-2013, 05:16 PM
  3. Replies: 4
    Last Post: 06-10-2013, 01:27 PM
  4. Excel Chart Showing Values on Angle: Nightingale Chart
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 0
    Last Post: 10-17-2012, 06:39 PM
  5. Replies: 1
    Last Post: 05-20-2012, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •