I am using X chart to display a line graph, however the x axis labels are not appearing.
I am thinking that I must have made basic mistake.
If you tap the points on the screen then the correct value label appears.
The code I am using is:
Any Ideas?
I am thinking that I must have made basic mistake.
If you tap the points on the screen then the correct value label appears.
The code I am using is:
B4X:
xclGraph.ClearData
xclGraph.Title = "Data"
xclGraph.YAxisName = "Depth (m)"
xclGraph.XAxisName = "Readings"
xclGraph.AddLine2("water depth",Globals.gcol_primarycol, 2dip, "RHOMBUS", False, Globals.gcol_primarycol)
xclGraph.AddLine("Pump depth",xui.Color_Blue)
xclGraph.AddLine("Total depth",xui.Color_red)
xclGraph.AutomaticTextSizes = True
xclGraph.XScaleTextOrientation= "45 DEGREES"
xclGraph.DrawXScale = True
Private ymax=0,ymin=10000 As Double
For Each rditem As Map In rdlist
Private adata() As Double = Array As Double(rditem.GetDefault("MonitoringValueMeasurement",0),ThisMonitoringPoint.GetDefault("MonitoringPointPumpDepth",0),ThisMonitoringPoint.GetDefault("MonitoringPointBaseDepth",0))
ymax = Max(ymax,Max(rditem.GetDefault("MonitoringValueMeasurement",0),Max(ThisMonitoringPoint.GetDefault("MonitoringPointPumpDepth",0),ThisMonitoringPoint.GetDefault("MonitoringPointBaseDepth",0))))
ymin = Min(ymin,Min(rditem.GetDefault("MonitoringValueMeasurement",0),Min(ThisMonitoringPoint.GetDefault("MonitoringPointPumpDepth",0),ThisMonitoringPoint.GetDefault("MonitoringPointBaseDepth",0))))
xclGraph.AddLineMultiplePoints("12 Jan",adata,False)
' xclGraph.AddLineMultiplePoints(Misccode.ConvertDBDate(rditem.GetDefault("MonitoringValueDate","No Date"),"dd MMM"),adata,False)
Next
xclGraph.AutomaticScale = False
xclGraph.YScaleMaxValue = ymax
xclGraph.YScaleMinValue = ymin
xclGraph.IncludeLegend = "BOTTOM"
xclGraph.ReverseYScale = True
xclGraph.ChartType = "LINE"
xclGraph.DrawChart
Any Ideas?