hi ya... lemme give you my code first... i will explain a little below
Code:' note : hin.... and hout's etc r all constants in delcarations relating to integer values [made it easier to note :P] Private Sub cmdPlotGraph_Click() StatusBar1.Panels(1).Text = "Preparing data..." Dim icnt As Integer Dim aChartData(1, 1 To 14) As Variant aChartData(1, 2) = "Unmatched Calls" aChartData(1, 3) = "Arrival Auto" aChartData(1, 4) = "Arrival Manual" aChartData(1, 5) = "Arrival Missed" aChartData(1, 6) = "Arrival Cancelled" aChartData(1, 7) = "Arrival Delayed" aChartData(1, 8) = "Arrival Callout" aChartData(1, 9) = "Depart Auto" aChartData(1, 10) = "Depart Manual" aChartData(1, 11) = "Depart Missed" aChartData(1, 12) = "Depart Cancelled" aChartData(1, 13) = "Depart Delayed" aChartData(1, 14) = "Depart Callout" Dim li As ListItem For Each li In Me.lvDetails.ListItems For icnt = 1 To 14 ReDim Preserve aChartData(li.Index + 1, icnt) Next icnt aChartData(li.Index + 1, 1) = li.Text aChartData(li.Index + 1, 2) = li.SubItems(hUnmatched - 1) aChartData(li.Index + 1, 3) = li.SubItems(hInAuto - 1) aChartData(li.Index + 1, 4) = li.SubItems(hInManual - 1) aChartData(li.Index + 1, 5) = li.SubItems(hInMissed - 1) aChartData(li.Index + 1, 6) = li.SubItems(hInCancel - 1) aChartData(li.Index + 1, 7) = li.SubItems(hInDelay - 1) aChartData(li.Index + 1, 8) = li.SubItems(hInCall - 1) aChartData(li.Index + 1, 9) = li.SubItems(hOutAuto - 1) aChartData(li.Index + 1, 10) = li.SubItems(hOutManual - 1) aChartData(li.Index + 1, 11) = li.SubItems(hOutMissed - 1) aChartData(li.Index + 1, 12) = li.SubItems(hOutCancel - 1) aChartData(li.Index + 1, 13) = li.SubItems(hOutDelay - 1) aChartData(li.Index + 1, 14) = li.SubItems(hOutCall - 1) Next li DoEvents StatusBar1.Panels(1).Text = "Loading graph..." Load frmChart frmChart.MSChart1.ChartData = aChartData StatusBar1.Panels(1).Text = "Showing graph..." frmChart.Show vbModal, Me StatusBar1.Panels(1).Text = Empty End Sub
ok basically i have a list view - detailed view, listing dates with figures of monitored calls into a server... etc... now these dates will not be fixed periods...
so i need to graph all dates ... this part is what im stuck at... when i come to redim the array it says the array dimentions are already set... how do i get arround this?: im guessing ive messed up somewhere...?
been a while since i last did some coding. so maybe its a simple error? [i hope] lol first time using this control too.. but i have figured the control [i think] its just loading this data into the array...
cheers guys.




Reply With Quote