Fusionchart custom message display inside the canvas

非 Y 不嫁゛ 提交于 2019-12-24 08:57:35

问题


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)



来源:https://stackoverflow.com/questions/24058365/fusionchart-custom-message-display-inside-the-canvas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!