Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    [VB.NET 2010] Chart Control 3DAreaStyle

    Ok, ciao ragazzi... ho un problema...

    Sto utilizzando il controllo Chart in 3D.. ma a seconda di quanti dati gli butto dentro ha più o meno profondità... e sta cosa mi da molto fastidio.. per farvi capire...

    codice:
    
            Dim ChartArea1 As ChartArea = New ChartArea()
            Dim Legend1 As Legend = New Legend()
            Dim Saldo As Series = New Series()
    
            Dim dt As New DataTable
            Dim ds As New DataSet
            ds.Tables.Add(dt)
    
    
    
    
            sql = "SELECT * FROM conto WHERE Month(Data)=5" 
            sql = sql & " Order By Data ASC"
    
    
    
            Dim da As New OleDbDataAdapter(sql, cnn)
            da.Fill(ds, "conto")
    
            ChartArea1.Name = "ChartArea1"
            Chart1.ChartAreas.Add(ChartArea1)
            Legend1.Name = "Legend1"
            Chart1.Legends.Add(Legend1)
            Chart1.Name = "Chart1"
            Saldo.ChartArea = "ChartArea1"
            Saldo.Legend = "Legend1"
            Saldo.Name = "Saldo"
            Saldo.ChartType = SeriesChartType.Spline
            Chart1.ChartAreas("ChartArea1").Area3DStyle.Enable3D = True
            Chart1.ChartAreas("ChartArea1").Area3DStyle.PointDepth = 100
            Chart1.ChartAreas("ChartArea1").Area3DStyle.PointGapDepth = 100
            Chart1.ChartAreas("ChartArea1").Area3DStyle.LightStyle = LightStyle.Realistic
            Chart1.ChartAreas("ChartArea1").Area3DStyle.Rotation = 30
            Chart1.ChartAreas("ChartArea1").Area3DStyle.Inclination = 45
            Chart1.Series.Add(Saldo)
            Chart1.TabIndex = 0
            Chart1.Legends("Legend1").BackColor = Color.Transparent
            Chart1.Series("Saldo").IsValueShownAsLabel = True
            Chart1.Series("Saldo").XValueMember = "Data"
            Chart1.Series("Saldo").YValueMembers = "Saldo"
            Chart1.DataSource = ds.Tables("conto")
    
            cnn.Close()
    Il database è questo:




    ok, ora, quando vado a fare la seguente query:


    codice:
    sql = "SELECT * FROM conto WHERE Month(Data)=4" 
    sql = sql & " Order By Data ASC"
    E quindi prendo solo il mese di aprile... (9 Record)

    Il grafico diventa così e il che va bene........



    Ma quando vado a fare la query:

    codice:
    sql = "SELECT * FROM conto WHERE Month(Data)=5" 
    sql = sql & " Order By Data ASC"
    Che mi prende solo 2 dati, il grafico si modifica tutto e diventa così:




    Il che, così non è proprio utilizzabile...

    Qualcuno che ha già sbattuto la testa o ha qualche dritta da darmi??
    Powered by iMac 27"

  2. #2
    bump
    Powered by iMac 27"

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.