Fusion Charts "onDataClick" Event

Develop and Deploy Cross-Browser Web Apps .
Post Reply
joedarock
Posts: 169
Joined: Thu Nov 19, 2015 8:39 pm

Fusion Charts "onDataClick" Event

Post by joedarock »

...doesn't fire.

The "onFusionChar"t event does work.

Ver 1.42LTS

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Post by support »

_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);
}

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

Re: Fusion Charts "onDataClick" Event

Post by joedarock »

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?

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Post by support »

   
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);
        }
    }
});
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

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

Re: Fusion Charts "onDataClick" Event

Post by joedarock »

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.

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Post by support »

in version 2.0:

xui.Class("


in version 1.4

Class("

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

Re: Fusion Charts "onDataClick" Event

Post by joedarock »

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.

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Post by support »

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));
        }
    }
});

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

Re: Fusion Charts "onDataClick" Event

Post by joedarock »

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

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: Fusion Charts "onDataClick" Event

Post by support »

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);
}

Post Reply