silkcfx Posted August 19, 2011 Report Posted August 19, 2011 Hi there, I've just started using the control, have looked at the programmer's reference and samples on data compacting but am at a loss. My requirement is to group data up by "any" field. I am considering using datasources to do this but was really curious about chart data compacting. I am writing in VB.net and don't really understand the sample provided in the programmer's reference as follows: 'This is assigning a new delegate of type CompactFormulaHandler Chart.Data.Y.CompactFormula = New CompactFormulaHandler(addressof SumFormula) 'This code is the handler for the delegate. Private Function SumFormula(data As IDataArray, seriesIndex As Integer, startPoint As Integer, endPoint As Integer) As Double Dim sum As double Dim i As Integer For i = startPoint To endPoint sum += data(seriesIndex, i) Next i Return sum End Function I've bolded the parts that were wrong in your example. I'm not sure "addressof" is the correct thing to do as I am new to delegates, but I know without anything specified it doesn't compile. With this code how do I go about actually creating my summed columns? Is there any sample code on this, as the only sample code I have seen uses the rather easier predefined forumlas. Quote
silkcfx Posted August 22, 2011 Author Report Posted August 22, 2011 Looks like my post got really messed up after being verified. Here's the last bit again.. I've bolded the partsthat were wrong in your example. I'm not sure "addressof" is thecorrect thing to do as I am new to delegates, but I know without anythingspecified it doesn't compile. With this code how doI go about actually creating my summed columns? Is there any sample code onthis, as the only sample code I have seen uses the rather easier predefinedforumlas. 'This is assigning a new delegate of type CompactFormulaHandler Chart.Data.Y.CompactFormula = New CompactFormulaHandler([b]addressof [/b]SumFormula) 'This code is the handler for the delegate. Private Function SumFormula(data As IDataArray, seriesIndex As Integer, startPoint As Integer, endPoint As Integer) As Double Dim sum As [b]double[/b] Dim i As Integer For i = startPoint To endPoint sum += data(seriesIndex, i) Next i Return sum End Function Quote
silkcfx Posted August 23, 2011 Author Report Posted August 23, 2011 Guys, I think your approval process is really messing up the posts I'm making.. Is there some other place I can seek support as the forums are unusable like this. Quote
IGSFX Posted September 11, 2011 Report Posted September 11, 2011 You can contact technical support by visiting www.mysoftwarefx.com/support. ---IGSFX Quote
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.