spoclate
Members-
Content count
3 -
Joined
-
Last visited
Everything posted by spoclate
-
Help creating Stacked Bar chart with JSP, Java and DB data
spoclate posted a topic in FusionCharts and JSP
Hi, New to the forum. Loving Fusion charts. I am having some issues creating a stacked bar chart. I can create a normal bar chart and also the drill down version. Each row of my DB table has several columns. It is these columns I would like stacked. I cannot find any examples An example is: analyst attention delta theta lowAlpha highAlpha lowBeta highBeta lowGamma highGamma time Analyst 72 246836 119537 797902 677390 861178 944870 937669 636754 1.49E+12 Analyst 54 706781 641939 286041 605622 392724 433530 97563 253251 1.49E+12 Analyst 63 607845 131630 43136 709612 999633 110155 427353 918349 1.49E+12 Analyst 85 763426 249246 450154 726588 989483 740372 387877 440868 1.49E+12 Any help is appreciated. Thanks -
Help creating Stacked Bar chart with JSP, Java and DB data
spoclate replied to spoclate's topic in FusionCharts and JSP
Hi, My DB is in postgresql. The create script is attached. ID is incremental the others have large values in them. Analyst name is varchar and timestamp is set everytime a row is added. I am struggling to find various ways of representing the data over time. Thanks for your help. create.sql -
Help creating Stacked Bar chart with JSP, Java and DB data
spoclate replied to spoclate's topic in FusionCharts and JSP
Hi, Thank you for your reply and sample code. I have implemented the JSP code and changed some areas to suit my DB and chart. I have hit an error on fusioncharts.js constructor.drawLabel as shown below Uncaught TypeError: Cannot read property 'length' of undefined at constructor.drawLabel (fusioncharts.js:1508) at Q (fusioncharts.js:329) I have only changed the areas shown in source below. // Form the SQL query that returns the top 10 most populous countries String sql="SELECT * from analystdata FETCH FIRST 50 ROWS ONLY"; ArrayList categories = new ArrayList(); categories.add(buildCategories("analystname", result,gson)); //prepare dataset ArrayList dataset = new ArrayList(); dataset.add(buildDataset("Beta Wave","highbeta", result, gson)); dataset.add(buildDataset("Alpha Wave", "highalpha", result, gson)); dataset.add(buildDataset("Theta Wave", "theta", result, gson)); dataset.add(buildDataset("Gamma Wave", "highgamma", result, gson)); This is the extent of the changes I made. Have you had an experience with this issue? Thanks in advance