donvari Posted August 20, 2007 Report Share Posted August 20, 2007 Hi, I would like to set the pointlabels position dynamiclly. So I need to check the length (value) of every Point (gant its a gant chart) in the chart and if the value is greater than a specified value the pointlabels should be in the gant (far) otherwise near the gant. I do this with a event on the client side (vbscript). Here is some code: Sub Chart1_PrePaint(sender,e) PositionLabel Document.All.Item("Chart1") End SubSub PositionLabel(ChartObject) MsgBox ChartObject. Data.Item(0, 0) 'ExampleEnd Sub I catch the pre_paint event and call a sub and need the chart.data.item(0,0) properies/value, but it doesn't work Does somebody have a suggestion? Quote Link to comment Share on other sites More sharing options...
donvari Posted August 20, 2007 Author Report Share Posted August 20, 2007 ? Quote Link to comment Share on other sites More sharing options...
donvari Posted August 21, 2007 Author Report Share Posted August 21, 2007 please help me Quote Link to comment Share on other sites More sharing options...
donvari Posted August 21, 2007 Author Report Share Posted August 21, 2007 can somebody help me? Quote Link to comment Share on other sites More sharing options...
Frank Posted August 21, 2007 Report Share Posted August 21, 2007 You can not set any properties during a PrePaint event, this would cause an infinite loop as the property setter invalidates the control. When you said it doesn't work what do you mean exactly? do you mean the code doesn't run? you get wrong output? Quote Link to comment Share on other sites More sharing options...
donvari Posted August 21, 2007 Author Report Share Posted August 21, 2007 hmm...but I tried the same with JavaScript and it works fine, I catched the PrePaint event and changed the properties. But with vbScript, i get the error: Object required 'ChartObject.Data' Quote Link to comment Share on other sites More sharing options...
donvari Posted August 22, 2007 Author Report Share Posted August 22, 2007 I think it is a tricky bug Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.