Help Chart and scaling and SelectionChange

M

Magnus Pettersson

Hi !

I'm using a webchart with custom scaling property
Custom Max = 5
Custom Min = 1

After setting these properties I always get a valid chpoint when clicking in
the chart.
I only want to have av valid chpoint when clicking on one not in the empty
area

Could anyone check if my code is correct. It displays the correct value,
serie when i remove the custom scalings

Private Sub ChartSpace1_SelectionChange()
Dim myrange As ChPoint
Dim myVal As Variant
Dim X As Integer
Dim Y As Integer
Dim dblPointValue
Dim strTest As Variant
On Error Resume Next
Set myrange = ChartSpace1.RangeFromPoint(ChartSpace1.Selection.Right,
ChartSpace1.Selection.Top)
Set myVal = ChartSpace1.Selection
dblPointValue = myrange.GetValue(chDimValues)
strTest = myrange.GetValue(chDimSeriesNames)
MsgBox "Y värde " & CStr(dblPointValue)
dblPointValue = myrange.GetValue(chDimCategories)
MsgBox "X värde " & CStr(dblPointValue)
MsgBox "Serie " & strTest
End Sub


/Magnus
 
M

Magnus Pettersson

To clarify I always get a value if i have the Max of X and Max Of Y
for example If max Y = 5 and X = 1000 and that point exists
I always get that point when clicking in a non chpoint area

/Magnus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top