I'm using the new Bubbblechart controls in a view and I want to process the click event so that I can display drilldown data,
The BubbleChartCategory has
BubbleChartValueR
BubbleChartValueX
BubbleChartValueY
To represent a single bubble
Each of these has a click event but I cannot work out how to access all of the values of the bubble in a single even handler.
I've looked at casting the sender as a BubbleChartValue but this only exposes a single value and I need all three
Any clues anyone?
BubbleCharts
Re: BubbleCharts
Jim,
a quick poke around suggests that you could try the following (based on the fact that #BubbleChart is a list).
The definitions used were:
Obviously, I am not doing anything with the values (other than writing them to the console), but I would imagine this should get you started.
B.
a quick poke around suggests that you could try the following (based on the fact that #BubbleChart is a list).
Code: Select all
Evtroutine Handling(#BubbleChartValueX.Click) Com_Sender(#Sender)
#COM_SELF.HandleClickEvent( #Sender )
Endroutine
Mthroutine Name(HandleClickEvent)
Define_Map For(*INPUT) Class(#PRIM_CHRT.BubbleChartValue) Name(#ValClicked)
Selectlist Named(#BubbleChart)
Continue If(#BubbleChartValueX.Value <> #ValClicked.Value)
#SYS_WEB.Console.Log( ('**** ' + #BubbleChartCategory.Caption) )
#SYS_WEB.Console.Log( ('**** Y= ' + #BubbleChartValueY.Value.AsString) )
#SYS_WEB.Console.Log( ('**** X= ' + #BubbleChartValueX.Value.AsString) )
#SYS_WEB.Console.Log( ('**** R= ' + #BubbleChartValueR.Value.AsString) )
Leave
Endselect
Endroutine
Code: Select all
Define_Com Class(#PRIM_CHRT.BubbleChart) Name(#BubbleChart) DisplayPosition(3) Height(349) Left(0) Parent(#COM_OWNER) TabPosition(3) TabStop(False) Top(58) Width(591) MaxSize(80)
Define_Com Class(#PRIM_CHRT.BubbleChartCategory) Name(#BubbleChartCategory) Parent(#BubbleChart) ThemeDrawStyle('Back(142,36,170,0.7)+Border(142,36,170,1)')
Define_Com Class(#PRIM_CHRT.BubbleChartValue) Name(#BubbleChartValueX) DisplayPosition(1) Parent(#BubbleChart) Description('Clients')
Define_Com Class(#PRIM_CHRT.BubbleChartValue) Name(#BubbleChartValueY) DisplayPosition(2) Parent(#BubbleChart) Description('Representatives')
Define_Com Class(#PRIM_CHRT.BubbleChartValue) Name(#BubbleChartValueR) DisplayPosition(3) Parent(#BubbleChart) Description('Revenue')
B.
Re: BubbleCharts
Actually, on further reflection, just try:
reason being: #BubbleChart.CurrentItem should be set by the Click event, so the values will be what they need to be.
Code: Select all
Evtroutine Handling(#BubbleChartValueX.Click) Com_Sender(#Sender)
#SYS_WEB.Console.Log( ('** ' + #BubbleChartCategory.Caption) )
#SYS_WEB.Console.Log( ('** Y= ' + #BubbleChartValueY.Value.AsString) )
#SYS_WEB.Console.Log( ('** X= ' + #BubbleChartValueX.Value.AsString) )
#SYS_WEB.Console.Log( ('** R= ' + #BubbleChartValueR.Value.AsString) )
#SYS_WEB.Console.Log( ('**') )
Endroutine
-
jimwatterson
- Posts: 56
- Joined: Thu Jul 09, 2020 8:31 am
Re: BubbleCharts
This all works beautifully.
Cheers Brendan.
Cheers Brendan.