Italian Raggruppare i dati e visualizzarli su una lista

Nikeddy

Active Member
Licensed User
oddio asp, provo a capirla.

Dim test_lista AsList
test_lista.Initialize 'inizializza la lista ora è = 0 test_lista.AddAll(ArrayAsString("Pluto","Paperino","...."))ForEach Valore AsStringIn test_listaLog(Valore)Next

dopo test_lista.addall(arrayasstring devo inserire i dati estratti dal db sopra, come faccio? io ho le variabili mese e contanti.
 

Nikeddy

Active Member
Licensed User
Case COUNTRIES_LIST
Dim COUNTRIES As List
COUNTRIES = parser.NextArray
For i = 0 To COUNTRIES.Size - 1
Dim m As Map
m = COUNTRIES.Get(i)
Dim tl As TwoLines
tl.First = m.Get("mese")
tl.Second = m.Get("contanti")
ListView1.AddTwoLines2(tl.First, tl.Second, tl)
Next
 

Nikeddy

Active Member
Licensed User
ora dai dati sopra estratti e messi in una lista, ci metto un grafico

mbc1.ChartData = Array As Float(52.3, 16.7, 46.0, 40.5, 101.6, 40.9, 15.7, 25.9, 35.6, 25.3, 67.5, 75.2)

solo che vorrei cambiare i numeri nella parentesi con l'array estratto...
 

Nikeddy

Active Member
Licensed User
B4X:
    mbc1.LegendShapeSize = 7.0   
    mbc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER", "CIRCLE")   
   
    mbc1.TheLegendColor = Colors.Blue
    mbc1.TheLegendTextSize = 20.0
    mbc1.LegendTitle = ""

    mbc1.ChartDescription = "MEDIA INCASSO GIORNO"
    mbc1.ChartDescriptionColor = Colors.Blue
    mbc1.ChartDescriptionTextSize = 17
    mbc1.setDescriptionPosition(mbc1.left + 14%x ,mbc1.top + 1%y)
   
    mbc1.ValueTextColor = Colors.Black
    mbc1.ValueTextSize = 10.0

   
    mbc1.BarColors = Array As Int(Colors.blue, Colors.blue, Colors.blue, Colors.blue, Colors.blue, Colors.blue, Colors.blue, Colors.blue, Colors.blue, Colors.blue, Colors.blue, Colors.blue)
    mbc1.LegendText = Array As String("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
    mbc1.ChartData = Array As Float(52.3, 16.7, 46.0, 40.5, 101.6, 40.9, 15.7, 25.9, 35.6, 25.3, 67.5, 75.2)    'values - it will be converted to %
    mbc1.DoubleTapToZoomEnabled = True
    mbc1.DrawBarShadow = False
    mbc1.GridBackgroundColor = Colors.white
    mbc1.ValueTextColor = 0XFFFFA500
    mbc1.DrawBorders = True
    mbc1.DrawGridBackground = True
    mbc1.DrawHighlightArrow = True
    mbc1.DrawValueAboveBar = True
    mbc1.PinchZoom = True
    mbc1.ScaleEnabled = True
    mbc1.BorderColor = Colors.Yellow
    mbc1.BorderWidth = 3.0
    mbc1.XaxisLabelPosition = "BOTTOM"
    mbc1.XaxisTextSize = 15.0
    mbc1.XaxisTextColor = Colors.Magenta
    mbc1.DrawYaxisGridLines = True
    mbc1.YaxisTextColor = Colors.Green
    mbc1.YaxisTextSize = 15.0

   
    mbc1.BarData = 12   'this number must be the same as the number of elements in the above arrays

cosi carico il grafico, però imposto dei valori fissi, (52.3,16.7 ecc) come metto i valori estratti dalla listbox sopra?
 
Top