Jump to content
JChartFX Community

Swap

Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Swap

  • Rank
    Newbie
  1. Issue with a bar chart

    JuanC, Here is the image for LineGraph with data points 100. Here is the image for bar chart with data points 27 : Please note that there is data for the points but the bar looks collapsed and appearing below the scroll bar. Is it because the value on the YAxis is too large for those points. Ex : 0 and next point is 9000, but the data point values are 110 and 20. In any case it should show above 0..but why is it showing below 0 ? Also I see that a scroll on Y Axis is not supported right now. When the data points increase the no of points on the Y-Axis decrease there by making the difference between each point on Y Axis too wide. Please suggest !! Thanks --Swapna
  2. Issue with a bar chart

    Hi, I have a bar chart and a scroll on the X-Axis. As the number of data points increase, immaterial of the scroll the bar width gets decreased to a point where some data points are shown but the bar against that data point is not seen. How would I fix it so that no matter how many data points are there, it displays evenly. Same works for line chart. Once the scroll is in place..immaterial of the number of data points graph is displayed correctly. Please help !!
  3. Issue with drilldown

    JuanC, Thank you for the reply. I have used unbind. I will check your suggestion too. I have another query. I need to request the graph for a certain interval. Ex: Get data from DB and repaint the graph for every 10 secs. How would I do it? Please suggest. Thanks Swapna
  4. Issue with drilldown

    Hi, I have added code for a bar chart drill down. The first time the chart loads, the drill down works as expected. The next time when I try to get data, the drilldown takes it as 2 clicks and displays 3rd level graph when clicking on 1st level graph. Here is the code : function loadChart(frm, data,duration) { chart1 = new cfx.Chart(); chart1.setDataSource(data); chart1.setGallery(cfx.Gallery.Bars); $("#graph1").empty(); var divHolder = graph1; chart1.create(divHolder); $("#graph1").click(function(evt) { doClick(evt, frm); }); } function doClick(evt, frm) { // alert('in graph click'); if (evt.hitType == cfx.HitType.Point) { var node = chart1.getSeries().getItem(evt.series).getText(); displayDrillDownGraph(frm, node, level); } } displayDrillDownGraph(frm, node, level){ var data = datafromajaxcall(); loadDrillDownChart(frm, data,duration); } function loadDrillDownChart(frm, data,duration) { chart1 = new cfx.Chart(); chart1.setDataSource(data); chart1.setGallery(cfx.Gallery.Bars); $("#graph1").empty(); var divHolder = graph1; chart1.create(divHolder); $("#graph1").click(function(evt) { doClick(evt, frm); }); } The flow is : When the 1st level graph is clicked, the displaydrilldowngraph is called and data is retrieved in json format and loaddrilldownchart is called.Clicking on the 2nd level graph will call the displaydrilldowngraph but with a different set of parameters. The first time I am requesting the graph, the drilldown to 3rd level works as expected. The second time if I request the graph with the previous graph already displayed in the <div>, the click on 1st level graph displays 3rd level graph. The execution does go to display second level graph but automatically takes as a click on it and displays the 3rd level. I have tried to debug when it is taking as a click when its not even displaying the second level,but in vain.I suspect the $(#graph1).empty() is doing something, but I have no idea. Any ideas, please help !! Thanks Swapna
  5. Hi, I am using Eclipse 3.7 IDE for my development and I have added the JChartFX for my graph needs. It works perfectly when I test from inside Eclipse IDE. But on IE 10, it throws error : SCRIPT5007: Unable to get property 'getElementById' of undefined or null reference. Here is my loadChart funtion : function loadChart(frm,data){ chart1 = new cfx.Chart(); chart1.setDataSource(data); chart1.setGallery(cfx.Gallery.Bars); var divHolder = frm.document.getElementById("graph"); // Alternatively I tried using document.forms("formname").elements("graph") but then it results in script error : SCRIPT5007: Unable to get property 'offsetWidth' of undefined or null reference. It points to jChartFX.system.js chart1.create(divHolder); } The document.getElementById works in all other jsp pages. Please help me resolve it as I am almost done with my development work and I am not sure how to fix this IE issue. Thanks
×