RubendeVroome

Members
  • Content count

    12
  • Joined

  • Last visited

About RubendeVroome

  • Rank
    Junior Member
  1. hi, I want to give my MSCombi2D chart new data by picking a new date from a date picker. I don't really know how to give the chart this new data and if it is possible to reload the chart without refreshing the whole page. these are parts of my code, both in a .aspx file. the function 'shwoGraph1(param)' needs the choosen date as a parameter. It needs to look as in the picture. I have succeeded so far as in the picture, now the graph needs the update as soon as I pick a date. <script type="text/javascript"> // BeginOAWidget_Instance_2137022: #datepicker $(function() { $("#datepicker").datepicker({ showOtherMonths: false }); }); // EndOAWidget_Instance_2137022 </script> <script type="text/javascript"> function getDate(str) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("graph1").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","CPUDataGraph.aspx?op=loadGraph1&date="+str,true); xmlhttp.send(); } </script> <div class="content"> <table width="740" border="0"> <tr> <td width="280"><% showTank1();%></td> <td width="450"><div id="datepicker"/></td> </tr> <tr> <td colspan="2"><center><% showGraph1(""); %></span></center></td> </tr> </table>
  2. Update Chart Data With Datastreamurl

    Okee, that was it for now. Thank you very much for all your time!! You helped me a lot!
  3. Update Chart Data With Datastreamurl

    I would like to change the color of liquid in the cylinder if it goes under a certain value, say 10000 kg. the way I do this right now, is to re-write te whole xml file. but this way i have to refresh the page, for the cylinder to change color. any solution on how to do this in kind of the same way as the change of the kg value? so that i don't have to refresh the whole page?
  4. Update Chart Data With Datastreamurl

    I am able to open it now, stupid mistake of mine. but my question remains. how can I ad one cylinder or other chart? I also would like to change the color of liquid in the cylinder if it goes under a certain value, say 10000 kg. the i do this right now, is to re-write te whole xml file. but this way i have to refresh the page, for the cylinder to change color. any solution on how to do this in kind of the same way as the change of the kg value? so that i don't have to refresh the whole page?
  5. Update Chart Data With Datastreamurl

    We have got a number of tanks and I want to display the amount of kg in each tank. for one tank I succeeded, but I actually don't know how to add another tank. Maybe I will also add a Line or Area chart for the use of the liquid in a specefic time. so my question is actually, how do I add another chart and retreive data for each chart? I have added my prject, so you can take a look at what I allready have. What kind of project did you use? I can't open it in visual studio, so I can only adjust the the cs files. If you can tell me what kind of project is was, I can dowload the correct format Project.zip
  6. Update Chart Data With Datastreamurl

    I render the Charts in the file default.aspx.cs like this: tank1.Text = FusionCharts.RenderChart("Script/Cylinder.swf","data.xml","","mychart1","250", "400", false, true); tank2.Text = FusionCharts.RenderChart("Script/Cylinder.swf","data2.xml", "", "mychart2", "250", "400", false, true); I suppose that each of this charts one by one gets updated by CPUData.aspx.cs what I want, is to update these charts with two different sql statements. So in the CPUData.aspx.cs I want to know which chart is currently handled. I want to do this in the following kind of way: string name = Convert.ToString(RenderChart.chartId); int rank; switch (name) { case "mychart1Div": // set sql statement for chart 1 break; case "mychart2Div": // set sql statement for chart 2 break; } my problem is in the first line: string name = Convert.ToString(RenderChart.chartId); the command RenderChart.chartId is not right. my question is what the right command for this action is. Thank you!
  7. Update Chart Data With Datastreamurl

    I already have this: string name = RenderChart.chartId; int rank; switch (name) { case "tank1": rank = 1; break; case "tank2": rank = 2; break; } int value = 1; string strSQL = "select waarde from rank" + rank + " where time = (select max(time) from rank" + rank + ");"; This doesn't work. how can I get the chartId from the Chart that is currently handled. this way I can get different data out of the database for the two charts.
  8. Update Chart Data With Datastreamurl

    The error was that it couldn't find the reference for system.linq. one last questions. how do I add one cylinder? esspecially in the html file and the default.apsx.cs how does an object refer from default.aspx.cs to cpudata.aspx.cs?
  9. Update Chart Data With Datastreamurl

    It works!! Thank you very much for your time!!!!
  10. Update Chart Data With Datastreamurl

    This is actually my problem. when I go to http://localhost/cpudata.aspx it gives an error on 'using system.linq' http://localhost/cpudata.aspx must be the right url isn't it
  11. Update Chart Data With Datastreamurl

    I think I still do something wrong. I have put your project in the wwwroot foler of my server. but it still doesn't update. It runs fine, but stays at 50. it doesn't adjust the value given in the xml file any ideas? it also gives an error in the web.config file. targetFramework is unknown. the command ofcourse, not the framework itself.
  12. Hello, I've downloaded the demo project from fusioncharts.com, because I needed the cylinder gauge. So, I've removed everything but the code for the cylinder gauge. I still use the DataGen.aspx.cs the Default.aspx.cs the default.aspx and offcourse the javascript functions. I have cleaned them all op allthough. I retreive data from a MySql database and load it into the cylinder gauge via a XML file. This all works perfectly! But the database is updated every minute, so I want the cylinder to look for new data. I saw that this is made possible by adding a dataStreamURL and a refreshInterval to the XML code for the cylinder gauge. I have tried several URL and methods but non of them works. Can anyone tell me the right URL to update the data to de cylinder gauge ?? I refresh every 3 seconds, so this can not be an issue. Thanks allready!! Ruben