Skip to content

CDEParameters

Nuno Gomes edited this page Feb 16, 2016 · 5 revisions

XPFusionChartComponent

Theme

To use the theme property you need to add the theme file as a resource to your CDE file and then simply use the theme name in the property.

Script Properties

Since the user can use all the FusionChart properties, we could not define them all in the CDE compomenent because it would be a really big list. So we implemented Script Properties were you can specefy properties that we did not implement, simply creating a Object with the properties you want.

Example (Chart Script Properties)

{
  showformbtn: "0",
  viewmode: "1",
  is3d: "1"
} 

Callback Functions

The Callback Functions where developed to give the user the ability to apply properties to a specific proportion of the data. To use the function you need to define a function with one argument and use the argument to apply new properties to your data.

Example

function(data) {
  if(data.id == "null" || data.id == "null2" || data.id == "null3"){
    data.width= "50";
    data.height = "40";
    data.alpha = "0";
    data.allowdrag = "0";
  }else{
    if(data.id == "pc1"){
      data.width = "110";
      data.height = "90";
      data.imagenode = "1";
      data.imageurl = "http://www.fusioncharts.com/explore/Resources/desktop.png";
      data.tooltext = "Name: PC1 <br> IP: 202.11.32.123 <br> Owner: Harry Mac";
      // apply a Javascript link to node with the data as a argument
      data.link = "JavaScript:nodelink("+JSON.stringify(data)+")";
      data.color="FE3233";
      data.alpha = "0"
      data.labelalign = "top";
      data.imagealign = "middle";
      data.imagewidth = "107";
                  data.imageheight = "67";
      data.allowdrag = "1"
    }else{
      // apply a webpage link to a node
      if(data.name == "Internet"){data.link = "n-http://www.fusioncharts.com/charts/drag-node-charts/";}
      data.shape= "circle";
      data.radius = "40";
    }
  }
}