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.