Intente seguir el post dl usuario Moises sobre este tema pero no me salió, llegué hasta lo del puntero: http://www.xailer.com/forum/viewtopic.php?t=11881
Tambien probé con el showToolTip pero no hubo caso. Bueno x las dudas dejo adjunto la foto , el código y el proyecto. Saludos.
Código: Seleccionar todo
#include "Xailer.ch"
#include "RMChartX.ch"
CLASS TForm1 FROM TForm
COMPONENT oBevel1
COMPONENT oBevel2
COMPONENT btImprimir
COMPONENT btCerrar
DATA oChart
METHOD CreateForm()
METHOD FormInitialize( oSender )
METHOD ArmaGrafico(aDatos)
METHOD btImprimirClick( oSender )
METHOD btCerrarClick( oSender )
METHOD GetPatente( oSender, p1, p2, p3, p4, p5 )
ENDCLASS
#include "Form1.xfm"
//------------------------------------------------------------------------------
METHOD FormInitialize( oSender ) CLASS TForm1
local aDatos:={}
::lCentered:=.T.
AADD(aDatos, 'Cantidad de Viajes por Vehiculos')
AADD(aDatos, 'Periodo Enero de 2017')
AADD(aDatos, 'N° de Patente (Cantidad de Viajes)')
AADD(aDatos, 'NMN345*CDE234*CDFG32*TYA123*JKL789*TYD436*ERDGH65*OLH547*WES880*ERT321') // Patentes
AADD(aDatos, '21*13*14*16*7*9*12*10*21*17') // Cantidad de Viajes x Vehiculo en el mes
::ArmaGrafico(aDatos)
RETURN Nil
//------------------------------------------------------------------------------
METHOD ArmaGrafico(aDatos) CLASS TForm1
local nCantPat:=10 , nMaximo:=31
::lCentered:=.T.
WITH OBJECT ::oChart := TRMChartX():New(::oBevel1)
:nAlign := alCLIENT
:Create()
END
WITH OBJECT ::oChart
:Reset()
:RMCBackColor = DullGreen
:RMCStyle = RMC_CTRLSTYLE3DLIGHT
:RMCWidth = ::oBevel1:nWidth
:RMCHeight = ::oBevel1:nHeight
:RMCBgImage = ""
:Font = "Tahoma"
:MouseUpA = "GetPatente"
//************** Add Region 1 *****************************
:AddRegion()
With object :Region(1)
:Left = 5
:Top = 10
:Width = -5
:Height = -5
:Footer = ""
:ShowBorder = FALSE
//************** Add caption to region 1 *******************
:AddCaption()
With object :Caption
:Titel = aDatos[1]
:BackColor = Bisque
:TextColor = Black
:FontSize = 10
:Bold = TRUE
End
//************** Add grid to region 1 *****************************
:AddGrid()
With object :Grid
:BackColor = Cornsilk
:AsGradient = TRUE
:BicolorMode = RMC_BICOLOR_NONE
:Left = 0
:Top = 0
:Width = 0
:Height = 0
End
//************** Add data Axis to region 1 *****************************
:AddDataAxis()
With object :DataAxis(1)
:Alignment = RMC_DATAAXISLEFT
:MinValue = "0"
:MaxValue = Str(nMaximo)
:TickCount = 10
:Fontsize = 8
:TextColor = Black
:LineColor = Black
:LineStyle = RMC_LINESTYLESOLID
:DecimalDigits = 0
:AxisUnit = ""
:AxisText = aDatos[2]
End
//************** Add label axis to region 1 *****************************
:AddLabelAxis()
With object :LabelAxis
:AxisCount = 1
:TickCount = nCantPat
:Alignment = RMC_LABELAXISBOTTOM
:Fontsize = 8
:TextColor = Black
:TextAlignment = RMC_TEXTUPWARD
:LineColor = Black
:LineStyle = RMC_LINESTYLESOLID
:AxisText = aDatos[3]
:LabelString = aDatos[4]
End
//************** Add legend to region 1 *******************************
:AddLegend()
With object :Legend
:Alignment = RMC_LEGEND_CUSTOM_UL
:BackColor = LightYellow
:Style = RMC_LEGENDROUNDRECT
:TextColor = Blue
:Fontsize = 8
:Bold = TRUE
:LegendString:=""
End
//************** Add Series 1 to region 1 *******************************
:AddBarSeries()
:BarSeries(1):SeriesStyle = RMC_BAR_FLAT_GRADIENT2
:BarSeries(1):SeriesType = RMC_BARSINGLE
:BarSeries(1):ValueLabelOn = RMC_VLABEL_DEFAULT_NOZERO
:BarSeries(1):Lucent = FALSE
:BarSeries(1):Color = Transparent
:BarSeries(1):WhichDataAxis = 1
:BarSeries(1):PointsPerColumn = 1
:BarSeries(1):HatchMode = RMC_HATCHBRUSH_OFF
:BarSeries(1):DataString = aDatos[5]
End
:Draw( .T. )
END
RETURN Nil
//------------------------------------------------------------------------------
METHOD GetPatente( oSender, p1, p2, p3, p4, p5) CLASS TForm1
LOCAL x, y, info, aPos, nFil1, nCol1, i
LOCAL oPop, nOption
IF p1 == 1 // Botón izquierdo
MsgInfo( ValType( p5 ) ) // Info Detalle
ELSEIF p1 == 2 // Botón derecho
// Info Detalle
ENDIF
RETURN NIL
//------------------------------------------------------------------------------
METHOD btImprimirClick( oSender ) CLASS TForm1
::oChart:Draw2Printer()
Printer:nOrientation:=DMORIENT_PORTRAIT
RETURN Nil
//------------------------------------------------------------------------------
METHOD btCerrarClick( oSender ) CLASS TForm1
::Close()
RETURN Nil