• Plotting points on a form (A2k3)

    Author
    Topic
    #406269

    I’ve built a form to plot survey results(see Picture). 10 questions with 2 values each(Importance and Rating)
    Everything works great unless there are 2 points with the same values. The points are laid on top of each other so it looks like you’re missing a question.
    I’m looking for ideas to vary the size of the points if they overlap.
    Here is the code I used to plot the points:

    Const conLeft = 1100
    Const conTop = 900
    _______________________
    Dim rs As Recordset
    Dim X As Integer
    Set db = CurrentDb
    Set rs = db.OpenRecordset(“qryChart”)
    X = 0
    rs.MoveFirst
    Do While Not rs.EOF
    Me(“Box4” & X).Top = rs!Importance * conTop
    Me(“Box4” & X).Left = rs!Rating * conLeft
    Me(“Box4” & X).Visible = True
    X = X + 1
    rs.MoveNext
    Loop

    Any Ideas would be welcome.
    Thanks,
    Scott

    Viewing 1 reply thread
    Author
    Replies
    • #841107

      You could try to add a random distortion to the data, but since the data points are already narrowly clustered, it wouldn’t help much, I’m afraid

      Const Fuzz = 40 ‘experiment to get a good value


      Me(“Box4” & X).Top = rs!Importance * conTop + Fuzz * (Rnd – 0.5)
      Me(“Box4” & X).Left = rs!Rating * conLeft + Fuzz * (Rnd – 0.5)

      • #841114

        Hans,
        A Fuzz factor of 70 works well. Thanks for the Idea.
        I was playing with a way to vary the size and then have the largest point in the back and then the next on top etc…
        Your Idea is much simpler and moves the points enough to see there is something behind.
        Have a great day,
        Scott

      • #841115

        Hans,
        A Fuzz factor of 70 works well. Thanks for the Idea.
        I was playing with a way to vary the size and then have the largest point in the back and then the next on top etc…
        Your Idea is much simpler and moves the points enough to see there is something behind.
        Have a great day,
        Scott

    • #841108

      You could try to add a random distortion to the data, but since the data points are already narrowly clustered, it wouldn’t help much, I’m afraid

      Const Fuzz = 40 ‘experiment to get a good value


      Me(“Box4” & X).Top = rs!Importance * conTop + Fuzz * (Rnd – 0.5)
      Me(“Box4” & X).Left = rs!Rating * conLeft + Fuzz * (Rnd – 0.5)

    Viewing 1 reply thread
    Reply To: Plotting points on a form (A2k3)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: