Fusionchart custom message display inside the canv

2019-08-07 09:33发布

问题:

I need to display message inside the fusionchart (I use Bar 2D Chart). I checked the API but I couldn't.

I need pass the xml message (I attached the image)

Can you please help me. (gray color is the boarder of the chart)

回答1:

Any way I found a way to implement this, but it used js (not using xml).

http://jsfiddle.net/shamasis/WzNKT/

This url help me lot, thank for the developer.

var myChart = new FusionCharts( "FusionCharts/Column3D.swf", 
      "myChartId", "400", "300", "0" );
      myChart.setXMLUrl("Data.xml");
      myChart.render("chartContainer");


function myChartListener(eventObject, argumentsObject) {
    myChart.ref.showChartMessage("Hello... the world ends here, take a peek before its gone!", true);
    }
 myChart.addEventListener ("rendered" , myChartListener );

When this message display it effect some black background color (like below image)

If you want to change the style of the message or background color then you can change the css of SVG

.xxxxx div span svg rect { 
    fill-opacity: 0;
}
.xxxxx div span svg g rect { 
    fill-opacity: 1;
}
.xxxxx div span svg text tspan {
    fill: black;
    font-size: 12px;
}

(This css to get same as top image)