xuen Report post Posted July 19, 2012 (edited) Hi, I have issue on customize the empty data message in Javascript Chart at code behind. My code as below: string chart = "<chart></chart>"; FusionCharts.SetRenderer("javascript"); FusionCharts.SetConfiguration("ChartNoDataText", "Please select a record above"); div_testing.Text = FusionCharts.RenderChart("../FusionCharts/MSBar2D.swf", "", chart, "ms_bar_testing", "450", "700", false, false); After the chart is rendered, the chart still showing the default value which is "No data to display." instead of "Please select a record above". Please help. Edited July 19, 2012 by xuen Share this post Link to post Share on other sites
xuen Report post Posted July 20, 2012 Anyone can help? Hi, I have issue on customize the empty data message in Javascript Chart at code behind. My code as below: string chart = "<chart></chart>"; FusionCharts.SetRenderer("javascript"); FusionCharts.SetConfiguration("ChartNoDataText", "Please select a record above"); div_testing.Text = FusionCharts.RenderChart("../FusionCharts/MSBar2D.swf", "", chart, "ms_bar_testing", "450", "700", false, false); After the chart is rendered, the chart still showing the default value which is "No data to display." instead of "Please select a record above". Please help. Share this post Link to post Share on other sites
Guest Sumedh Report post Posted July 20, 2012 Hi, We are looking into issue. We will update you on the same. Share this post Link to post Share on other sites
Guest Sumedh Report post Posted July 23, 2012 Hi, You can change the chart message using standard JavaScript method "configure" provided by FusionCharts JavaScript API. You would need to call "configure" method on the chart variable in .aspx page. Ref. Code: <form id="form1" runat="server"> <div style="padding:40px; background-color:#DCDCDC; border:1px solid #DCDCDC; width: 600px;"> <asp:Literal ID="Literal1" runat="server"></asp:Literal> <script type="text/javascript"> var myChart = FusionCharts("myFirst"); myChart.configure("ChartNoDataText", "Please select a record above."); </script> </div> </form> Please find attached illustration for your reference. MSColumn3D.zip Share this post Link to post Share on other sites
xuen Report post Posted July 24, 2012 (edited) Hi, Thanks for the solution but the customize message can only load for first time. Scenario: 1. Frist load no data return with the filtering value I enter. The customize message can be show. 2. Click on Search button again with the filtering value, Default message is show instead of the customize message. Info: My <asp:literal> will control by the ajax loader. <telerik:ajaxsetting ajaxcontrolid="btnSearch"> <updatedcontrols> <telerik:ajaxupdatedcontrol controlid="div_testing" /> </updatedcontrols> </telerik:ajaxsetting> <fieldset id="fsTesting" > <legend >Testing</legend> <center> <asp:literal id="div_testing" runat="server"></asp:literal> <script type="text/javascript"> var testChart = FusionCharts("col_testing"); testChart.configure("ChartNoDataText", "Please select a record above. col_aoc_int"); </script> </center> </fieldset> Please help. Thanks in advanced. Hi, You can change the chart message using standard JavaScript method "configure" provided by FusionCharts JavaScript API. You would need to call "configure" method on the chart variable in .aspx page. Ref. Code: <form id="form1" runat="server"> <div style="padding:40px; background-color:#DCDCDC; border:1px solid #DCDCDC; width: 600px;"> <asp:Literal ID="Literal1" runat="server"></asp:Literal> <script type="text/javascript"> var myChart = FusionCharts("myFirst"); myChart.configure("ChartNoDataText", "Please select a record above."); </script> </div> </form> Please find attached illustration for your reference. Edited July 24, 2012 by xuen Share this post Link to post Share on other sites
xuen Report post Posted July 26, 2012 Hi, Anyone can help? Thanks in advanced. Hi, Thanks for the solution but the customize message can only load for first time. Scenario: 1. Frist load no data return with the filtering value I enter. The customize message can be show. 2. Click on Search button again with the filtering value, Default message is show instead of the customize message. Info: My <asp:literal> will control by the ajax loader. <telerik:ajaxsetting ajaxcontrolid="btnSearch"> <updatedcontrols> <telerik:ajaxupdatedcontrol controlid="div_testing" /> </updatedcontrols> </telerik:ajaxsetting> <fieldset id="fsTesting" > <legend >Testing</legend> <center> <asp:literal id="div_testing" runat="server"></asp:literal> <script type="text/javascript"> var testChart = FusionCharts("col_testing"); testChart.configure("ChartNoDataText", "Please select a record above. col_aoc_int"); </script> </center> </fieldset> Please help. Thanks in advanced. Share this post Link to post Share on other sites
Guest Sumedh Report post Posted July 26, 2012 Hi, You would have to create a function. in this function, you would need to write the "chart message" code. And call this function inside the Page_Load page as well as inside the Search button's code. Hope this helps! Share this post Link to post Share on other sites
xuen Report post Posted July 27, 2012 Hi, The function you mean is javascript function or code behind function? Can you provide the sample? Thanks. Hi, You would have to create a function. in this function, you would need to write the "chart message" code. And call this function inside the Page_Load page as well as inside the Search button's code. Hope this helps! Share this post Link to post Share on other sites
xuen Report post Posted July 31, 2012 Hi, Any update? Hi, The function you mean is javascript function or code behind function? Can you provide the sample? Thanks. Share this post Link to post Share on other sites
Guest Sumedh Report post Posted July 31, 2012 Hi, There is no sample for this type of scenario, you would have to write your own logic for this. Share this post Link to post Share on other sites
xuen Report post Posted August 1, 2012 Hi, If no sample, how do you know create a function and call in Page_load and Search Button is working? Hi, There is no sample for this type of scenario, you would have to write your own logic for this. Share this post Link to post Share on other sites
Guest Sumedh Report post Posted August 1, 2012 Hi, It is a work-around for this scenario which you can try. Share this post Link to post Share on other sites