[Gambas-user] Multiple charts using gb.chart
Alberto Caballero
alberto.kavan at ...626...
Fri Jun 28 12:54:00 CEST 2013
Hi Fabien,
Thanks for your support.
Here you have the piece of code that manages the graph. For a new graph at
a new DrawingArea, should I declare a new Chart variable? I think this did
not work for me.
Private Sub GenGraficaCaudales()
Dim i As Integer
Dim msg As String
Dim titles As New String[365]
Dim CaudalesArray As New Float[365]
For i = 0 To 364
msg = Str$(i)
titles[i] = msg
Next
CaudalesArray = pProyecto.GetCaudalesArray()
ChartCaudales.Headers.Values = titles
ChartCaudales.CountDataSets = 1
ChartCaudales[0].Text = "Caudales"
ChartCaudales[0].Values = CaudalesArray
ChartCaudales.Style = ChartStyle.Custom
ChartCaudales.Colors.values = [Color.blue, Color.Yellow]
ChartCaudales.Legend.Visible = True
ChartCaudales.Legend.Title = "Leyenda"
'Titulo de la Gráfica
ChartCaudales.Title.Text = "Curva de Caudales Clasificados"
ChartCaudales.XAxe.Step = 10
ChartCaudales.YAxe.MinValue = 0
ChartCaudales.YAxe.MaxValue = 15
ChartCaudales.Proportionnal = True
'Tipo de Gráfica
ChartCaudales.Type = ChartType.Lines
End
Public Sub DrawingArea1_Draw()
If (DrawOk = True) Then
ChartCaudales.Width = DrawingArea1.ClientHeight - 50
ChartCaudales.Height = DrawingArea1.ClientWidth - 50
ChartCaudales.Resize(880, 450)
ChartCaudales.Draw 'Muestra la Grafica
Endif
End
2013/6/27 Fabien Bodard <gambas.fr at ...626...>
> can you send me your project or a part of it that show the problem ?
>
>
> 2013/6/27 Alberto Caballero <alberto.kavan at ...626...>
>
> > Hi all,
> >
> > I am trying to show multiple charts inside a TabView. I managed to show
> > only one chart. I only get compilation errors or the new chart is not
> > displayed. I tried to find something to help me in the internet, and even
> > in this mailing list, but I was unable to find anything.
> >
> > Would you provide me any reference or an example to have a look?
> >
> > Thanks in advance,
> >
> > Alberto
> >
> >
> ------------------------------------------------------------------------------
> > This SF.net email is sponsored by Windows:
> >
> > Build for Windows Store.
> >
> > http://p.sf.net/sfu/windows-dev2dev
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
>
>
> --
> Fabien Bodard
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list