Fusion Charts "onDataClick" Event

Develop and Deploy Cross-Browser Web Apps .

Fusion Charts "onDataClick" Event

Postby joedarock » Mon Mar 13, 2017 5:55 pm

...doesn't fire.

The "onFusionChar"t event does work.

Ver 1.42LTS
joedarock
 
Posts: 146
Joined: Thu Nov 19, 2015 8:39 pm

Re: Fusion Charts "onDataClick" Event

Postby support » Tue Mar 14, 2017 5:09 pm

_xui_ui_fusionchartsxt1_onfusionchartsevent:function (prf, eventObject, argumentsObject){
var ns = this, uictrl = profile.boxing();
console.log(arguments);
}

==》


_xui_ui_fusionchartsxt1_onfusionchartsevent:function (prf, eventObject, argumentsObject){
var ns = this, uictrl = prf.boxing();
console.log(arguments);
}
support
 
Posts: 331
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Postby joedarock » Wed Mar 15, 2017 1:00 pm

As I said, "onfusionchartsevent" does fire an event, but "onDataClick" does not. If there isn't a way to get an onDataClick event, why is it in the list of events in the IDE? If there isn't an onDataClick event, how can I determine same from "onfusionChartsevent"? Related: How to decode the argumentsObject?
joedarock
 
Posts: 146
Joined: Thu Nov 19, 2015 8:39 pm

Re: Fusion Charts "onDataClick" Event

Postby support » Wed Mar 15, 2017 1:09 pm

   
xui.Class('App', 'xui.Module',{
Instance:{
iniComponents : function(){
// [[Code created by CrossUI RAD Studio
var host=this, children=[], append=function(child){children.push(child.get(0));};

append(
xui.create("xui.UI.FusionChartsXT")
.setHost(host,"xui_ui_fusionchartsxt1")
.setLeft("8.333333333333334em")
.setTop("5em")
.setJSONData({
"chart":{
"caption":"Monthly Sales Summary",
"subcaption":"For the year 2006",
"xaxisname":"Month",
"yaxisname":"Sales",
"numberprefix":"$",
"useroundedges":"1",
"bgcolor":"FFFFFF,FFFFFF",
"showborder":"0",
"rotatevalues":"1"
},
"data":[{
"label":"January",
"value":"17400"
},
{
"vline":"1",
"color":"FF5904",
"thickness":"2"
},
{
"label":"February",
"value":"19800"
},
{
"label":"March",
"value":"21800"
},
{
"label":"April",
"value":"23800"
},
{
"label":"May",
"value":"29600"
},
{
"label":"June",
"value":"27600"
}],
"trendlines":[{
"line":[{
"startvalue":"22000",
"color":"00cc00",
"displayvalue":"Average"
}]
}]
})
.onDataClick("_xui_ui_fusionchartsxt1_ondataclick")
);

return children;
// ]]Code created by CrossUI RAD Studio
},

_xui_ui_fusionchartsxt1_ondataclick:function (profile, argsMap){
var ns = this, uictrl = profile.boxing();
console.log(argsMap);
}
}
});
   


and you can use "console.log(argumentsObject);" to show it's object struct
support
 
Posts: 331
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Postby joedarock » Wed Mar 15, 2017 2:05 pm

This event code, in my program, does nothing. If I attempt to run your example using "Execute Code", the page fails to launch at all.
joedarock
 
Posts: 146
Joined: Thu Nov 19, 2015 8:39 pm

Re: Fusion Charts "onDataClick" Event

Postby support » Wed Mar 15, 2017 7:25 pm

in version 2.0:

xui.Class("


in version 1.4

Class("
support
 
Posts: 331
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Postby joedarock » Fri Mar 17, 2017 2:22 pm

n version 2.0:
xui.Class("
in version 1.4
Class("
-----------------------------------

I did that...still nothing. Here is the code:

Class('App', 'xui.Com',{
.
.
.
append(
xui.create("xui.UI.FusionChartsXT")
.setHost(host,"ctl_fusionchartsxt169")
.setDomId("chart_Voltages")
.setAutoTips(false)
.setLeft(440)
.setTop(350)
.setWidth(570)
.setHeight(125)
.setJSONData({
"chart" : {
"animation" : "0",
"enableChartMouseMoveEvent" : "1",
"caption" : "No Data",
"subcaption" : "",
"xaxisname" : "",
"yaxisname" : "Volts",
"useroundedges" : "1",
"bgcolor" : "FFFFFF",
"showborder" : "1",
"rotatevalues" : "1",
"borderthickness" : 1,
"showvalues" : "0",
"showlabels" : "0",
"canvasbgcolor" : "FFFFFF",
"showtooltip" : "0",
"animationDuration" : "0",
"tooltipsepchar" : "k"
},
"data" : [{
"label" : "1",
"value" : "174",
"color" : "#FF0000",
"showlabel" : "0",
"showvalue" : "0"
},
{
"vline" : "1",
"color" : "",
"thickness" : "0"
},
{
"label" : "2",
"value" : "198"
},
{
"label" : "3",
"value" : "218"
},
{
"label" : "4",
"value" : "238"
}]
}
)
.onFusionChartsEvent("_ctl_fusionchartsxt169_onfusionchartsevent")
.onDataClick("_ctl_fusionchartsxt169_ondataclick")
);
.
.
.
_ctl_fusionchartsxt169_ondataclick:function (prf,argsMap){
var ns = this, uictrl = profile.boxing();
alert();
}

The alert is never displayed.
joedarock
 
Posts: 146
Joined: Thu Nov 19, 2015 8:39 pm

Re: Fusion Charts "onDataClick" Event

Postby support » Fri Mar 17, 2017 3:06 pm

javascript code
Class('App', 'xui.Module',{
Instance:{
iniComponents : function(){
// [[Code created by CrossUI RAD Studio
var host=this, children=[], append=function(child){children.push(child.get(0));};
append(
xui.create("xui.UI.FusionChartsXT")
.setHost(host,"ctl_fusionchartsxt169")
.setDomId("chart_Voltages")
.setAutoTips(false)
.setLeft(440)
.setTop(350)
.setWidth(570)
.setHeight(125)
.setJSONData({
"chart" : {
"animation" : "0",
"enableChartMouseMoveEvent" : "1",
"caption" : "No Data",
"subcaption" : "",
"xaxisname" : "",
"yaxisname" : "Volts",
"useroundedges" : "1",
"bgcolor" : "FFFFFF",
"showborder" : "1",
"rotatevalues" : "1",
"borderthickness" : 1,
"showvalues" : "0",
"showlabels" : "0",
"canvasbgcolor" : "FFFFFF",
"showtooltip" : "0",
"animationDuration" : "0",
"tooltipsepchar" : "k"
},
"data" : [{
"label" : "1",
"value" : "174",
"color" : "#FF0000",
"showlabel" : "0",
"showvalue" : "0"
},
{
"vline" : "1",
"color" : "",
"thickness" : "0"
},
{
"label" : "2",
"value" : "198"
},
{
"label" : "3",
"value" : "218"
},
{
"label" : "4",
"value" : "238"
}]
}
)
.onFusionChartsEvent("_ctl_fusionchartsxt169_onfusionchartsevent")
.onDataClick("_ctl_fusionchartsxt169_ondataclick")
);


return children;
// ]]Code created by CrossUI RAD Studio
},
_ctl_fusionchartsxt169_ondataclick:function (prf,argsMap){
var ns = this, uictrl = prf.boxing();
alert(_.stringify(argsMap));
}
}
});
support
 
Posts: 331
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Postby joedarock » Fri Mar 17, 2017 5:35 pm

I pasted your code (above) into the SPA o-line builder. I assume it's based on Ver 2.0, since I needed to use "xui.Class" to make the code run.

When I run it, the chart displays but I get nothing in the console when I click on a chart element.

BTW, feel free to use some words instead of just pasting code. Words are free and they really help to explain things

Joe
joedarock
 
Posts: 146
Joined: Thu Nov 19, 2015 8:39 pm

Re: Fusion Charts "onDataClick" Event

Postby support » Sat Mar 18, 2017 2:48 am

I'd give you the right answer in the first reply.

support wrote:_xui_ui_fusionchartsxt1_onfusionchartsevent:function (prf, eventObject, argumentsObject){
var ns = this, uictrl = profile.boxing();
console.log(arguments);
}

==》


_xui_ui_fusionchartsxt1_onfusionchartsevent:function (prf, eventObject, argumentsObject){
var ns = this, uictrl = prf.boxing();
console.log(arguments);
}
support
 
Posts: 331
Joined: Sat Apr 27, 2013 9:22 am


Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 2 guests

cron