Sign in to follow this  
Damon

Setting The "pbarloadingtext" Of Chart Doesn't Work

Recommended Posts

Hi,

 

I want to change the "PBarLoadingText" of chart to display my own custom message while the chart is loading. I am following the demo in the demo gallary to do the settings. But it seems like it doesn't work(The settings to "ChartNoDataText" of chart works.) I have no idea about it.

 

Could any one give me some advice. Any advice will be appreciated!

Following is my code.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FusionChart.ascx.cs" Inherits="FusionChart" %>

<script type="text/javascript" src="<%=AppRoot %>FusionCharts/FusionCharts.js"></script>

<div id="<%=ContainerId %>" style="height:100%;background-color:transparent;"></div>

<script type="text/javascript" lang="javascript">

   FusionCharts.setCurrentRenderer('javascript');
   var myChart = new FusionCharts("<%=AppRoot %>FusionCharts/<%=ChartType.ToString() %>.swf", "<%=ChartId %>", "<%=Width %>", "<%=Height %>", "<%=DebugModeOn %>", "<%=RegisterWithJS %>");
   myChart.setJSONData('<%=JsonData %>');
   //myChart.setJSONData('<chart></chart>');
   myChart.setTransparent(true);
   myChart.configure({
       "PBarLoadingText": '<%=GetLocalResourceObject("PBarLoadingText").ToString() %>',//"zh-cn: 加载数据中...;en-us:Loading Data",
       "ChartNoDataText": '<%=GetLocalResourceObject("ChartNoDataText").ToString() %>',//"No data to display." ,
       "InvalidXMLText"  : '<%=GetLocalResourceObject("InvalidXMLText").ToString() %>',//"Invalid data.",
       "XMLLoadingText"  : '<%=GetLocalResourceObject("XMLLoadingText").ToString() %>',//"Retrieving Data. Please Wait.",
       "ParsingDataText"  : '<%=GetLocalResourceObject("ParsingDataText").ToString() %>',//"Reading Data. Please Wait.",
       "RenderingChartText"  : '<%=GetLocalResourceObject("RenderingChartText").ToString() %>',//"Rendering Chart. Please Wait.",
       "LoadDataErrorText"  : '<%=GetLocalResourceObject("LoadDataErrorText").ToString() %>'//"Error in loading data."
    });
    myChart.render("<%=ContainerId %>");         

</script>

"

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this