Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21237

how to display 2 graphs in the same mschart

$
0
0
hey
i have a mscahrt that displays each month the expenses its calles ExpCost

now i added another one that its called ExpQuantity

how do i add another bar next to the ExpCost?

i dont want to sum ExpCost and ExpQuantity together

i want ExpQauntity to be in a diffrent bar but in the same mschart next to the ExpCost.


this is my code
Code:

Dim r As New ADODB.Recordset
    CmbChType.text = CmbChType.List(0)
    CmbChStyle.text = CmbChStyle.List(0)
   
  r.Open "SELECT Format(ExpDate, ""mmmmyyyy"") As ExpMonth, SUM(ExpCost)FROM Expenses Group By Format(ExpDate, ""mmmmyyyy"")", CN, adOpenKeyset

    If r.EOF Then Exit Sub
    ReDim arrMn(1 To r.RecordCount, 1 To 3)
    For I = 1 To r.RecordCount
        arrMn(I, 1) = r.Fields(0)
        arrMn(I, 2) = r.Fields(1)
       
       
       
       
        r.MoveNext
    Next
    MSChart.ChartData = arrMn
    r.Close


Viewing all articles
Browse latest Browse all 21237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>