Home forums Using CanvasJS Using JSP Reply To: Using JSP

#20304

AShipway
Member

I followed this tutorial to set up the server/web app/database: https://netbeans.org/kb/docs/web/mysql-webapp.html. I’m using Postgres instead of MySQL but shouldn’t matter. I have not yet attempted to update a graph with data from my database. At this point I’m just trying to figure out how to display a graph I downloaded from CanvasJS on a page with HTML elements and formatting. The graph I’m trying to use is the JSP version of the “Olympic Medals of all Times” bar chart. I am able to display it if I navigate to it from my HTML start page but not if I make it the start page in the application. In that case the browser say there was a Java exception. I don’t have much to put on a drive to share (I would need your email in any case to share documents). Helpful advice would be how to create a bar graph in a JSP framework that will display on a web page along with HTML elements and formatting. We have to input parameters in fields on the web page which will modify the database query and update the bar chart with new data once the ‘submit’ button is clicked. I need to know how to assign variables to the height of the bars in the chart that will be updated with new values from a modified query. The HTML coded fields and the bar charts (2 of them) must be on the same web page. I have taken a course in HTML5/CSS so that part is not an issue. I have background in Java but just learning JavaScript for this project.