Axes.Bottom.MaxXValue vs Axes.Bottom.Maximum
Axes.Bottom.MaxXValue vs Axes.Bottom.Maximum
Hi,
Could some confirm if I'm understanding the difference between Axes.Bottom.MaxXValue and Axes.Bottom.Maximum correctly?
Is Axes.Bottom.MaxXValue the maximum x value of all the points in all the series that have been added to the chart, whereas Axes.Bottom.Maximum is the maximum x value of the axis. By default, Axes.Bottom.Maximum = Axes.Bottom.MaxXValue if Axes.Bottom.Automatic = True? But you can set Axes.Bottom.Maximum to any value if Axes.Bottom.Automatic = False?
Does the Axes.Bottom.SetMinMax method have to be called before you can access the value of Axes.Bottom.Maximum? When I tried outputting the value of Axes.Bottom.Maximum before calling this method I get 00:00:00. I've read including the line Dim bmp as Bitmap = WebChart1.Chart.Bitmap will force the Axes.Bottom.Maximum value to be updated but I get an error if I use this.
Thanks
Could some confirm if I'm understanding the difference between Axes.Bottom.MaxXValue and Axes.Bottom.Maximum correctly?
Is Axes.Bottom.MaxXValue the maximum x value of all the points in all the series that have been added to the chart, whereas Axes.Bottom.Maximum is the maximum x value of the axis. By default, Axes.Bottom.Maximum = Axes.Bottom.MaxXValue if Axes.Bottom.Automatic = True? But you can set Axes.Bottom.Maximum to any value if Axes.Bottom.Automatic = False?
Does the Axes.Bottom.SetMinMax method have to be called before you can access the value of Axes.Bottom.Maximum? When I tried outputting the value of Axes.Bottom.Maximum before calling this method I get 00:00:00. I've read including the line Dim bmp as Bitmap = WebChart1.Chart.Bitmap will force the Axes.Bottom.Maximum value to be updated but I get an error if I use this.
Thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Norman,
No, for Axes.Bottom.Maximum to be automatically calculated the chart needs to have been drawn. You can force this being internally done using TChart1.Draw() method before retrieving Maximum value. Draw() method does almost the same as Bitmap method.
Hope this helps!
Yes, that's almost correct. The only thing that should be changed is that MaxXValue is the maximum x value of all the points in all the series that have been *associated to the specified axis*.Is Axes.Bottom.MaxXValue the maximum x value of all the points in all the series that have been added to the chart, whereas Axes.Bottom.Maximum is the maximum x value of the axis. By default, Axes.Bottom.Maximum = Axes.Bottom.MaxXValue if Axes.Bottom.Automatic = True? But you can set Axes.Bottom.Maximum to any value if Axes.Bottom.Automatic = False?
Does the Axes.Bottom.SetMinMax method have to be called before you can access the value of Axes.Bottom.Maximum? When I tried outputting the value of Axes.Bottom.Maximum before calling this method I get 00:00:00. I've read including the line Dim bmp as Bitmap = WebChart1.Chart.Bitmap will force the Axes.Bottom.Maximum value to be updated but I get an error if I use this.
No, for Axes.Bottom.Maximum to be automatically calculated the chart needs to have been drawn. You can force this being internally done using TChart1.Draw() method before retrieving Maximum value. Draw() method does almost the same as Bitmap method.
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi norman,
Sorry, that's for WinForms chart only. You could try doing this:
In VB should be like this:
Sorry, that's for WinForms chart only. You could try doing this:
Code: Select all
Bitmap bmp = WebChart1.Chart.Bitmap((int)WebChart1.Width.Value, (int)WebChart1.Height.Value);
Code: Select all
Dim bmp As Bitmap = WebChart1.Chart.Bitmap(CType(WebChart1.Width.Value,Integer), CType(WebChart1.Height.Value,Integer))
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Sorry not sure but it doesn't seem to work - see
Thanks
Code: Select all
Dim series As New Steema.TeeChart.Styles.Line
series.Pointer.Style = PointerStyles.Circle
series.Pointer.Visible = True
series.XValues.DateTime = True
For i As Integer = 0 To 999
series.Add(today.AddDays(-i), i * 10)
Next
WebChart1.Chart.Series.Add(series)
Dim bmp As Bitmap = WebChart1.Chart.Bitmap(CType(WebChart1.Width.Value, Integer), CType(WebChart1.Height.Value, Integer))
' WebChart1.Chart.Axes.Bottom.Maximum = 00:00:00
Response.Write("WebChart1.Chart.Axes.Bottom.Maximum: " & Date.FromOADate(WebChart1.Chart.Axes.Bottom.Maximum) & "<br>")
Response.Write("WebChart1.Chart.Axes.Bottom.Minimum: " & Date.FromOADate(WebChart1.Chart.Axes.Bottom.Minimum) & "<br>")
WebChart1.Chart.Axes.Bottom.SetMinMax(today.AddDays(-7), today)
' Now WebChart1.Chart.Axes.Bottom.Maximum is updated
Response.Write("WebChart1.Chart.Axes.Bottom.Maximum: " & Date.FromOADate(WebChart1.Chart.Axes.Bottom.Maximum) & "<br>")
Response.Write("WebChart1.Chart.Axes.Bottom.Minimum: " & Date.FromOADate(WebChart1.Chart.Axes.Bottom.Minimum) & "<br>")
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi norman,
Commenting in the Bitmap method call works fine for me here:
Commenting in the Bitmap method call works fine for me here:
Code: Select all
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim series As New Steema.TeeChart.Styles.Line
series.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
series.Pointer.Visible = True
series.XValues.DateTime = True
For i As Integer = 0 To 999
series.Add(Today.AddDays(-i), i * 10)
Next
WebChart1.Chart.Series.Add(series)
'Dim bmp As Drawing.Bitmap = WebChart1.Chart.Bitmap(CType(WebChart1.Width.Width.Value, Integer), CType(WebChart1.Height.Value, Integer))
' WebChart1.Chart.Axes.Bottom.Maximum = 00:00:00
Response.Write("WebChart1.Chart.Axes.Bottom.Maximum: " & Date.FromOADate(WebChart1.Chart.Axes.Bottom.Maximum) & "<br>")
Response.Write("WebChart1.Chart.Axes.Bottom.Minimum: " & Date.FromOADate(WebChart1.Chart.Axes.Bottom.Minimum) & "<br>")
WebChart1.Chart.Axes.Bottom.SetMinMax(Today.AddDays(-7), Today)
' Now WebChart1.Chart.Axes.Bottom.Maximum is updated
Response.Write("WebChart1.Chart.Axes.Bottom.Maximum: " & Date.FromOADate(WebChart1.Chart.Axes.Bottom.Maximum) & "<br>")
Response.Write("WebChart1.Chart.Axes.Bottom.Minimum: " & Date.FromOADate(WebChart1.Chart.Axes.Bottom.Minimum) & "<br>")
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi norman,
Yes, old version should be uninstalled first.
Yes, old version should be uninstalled first.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |