在Dojo连接Oracle数据库表时需要帮助

时间:2015-04-12 14:46:07

标签: oracle jsp dojo

我正在使用oracle db& jsp

这是我的表格: 股票表:列是每日,每周,每月。

如何将我的oracle表连接到Dojo& wnt以显示柱形图。

这是我的JSP文件Report.jsp

如果我对表中的数据进行硬编码,我会得到柱形图。

无法动态生成列聊天。 请帮助我如何将我的oracle表与dojo连接。

非常感谢任何示例代码如何将oracle表与dojo连接。

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Reorts</title>

  <!-- Dojo Stylesheets -->
  <link rel="stylesheet" href="dojoroot/dijit/themes/claro/claro.css"  media="screen"/>
  <link rel="stylesheet" href="dojoroot/dojo/resources/dojo.css" />

  <!-- Dojo Scripts -->   
  <script>dojoConfig = {parseOnLoad: true}</script>
  <script src="dojoroot/dojo/dojo.js"></script>
  <script>

    require(["dojox/charting/Chart",  
             "dojox/charting/themes/MiamiNice",
            "dojox/charting/plot2d/Columns",
            "dojox/charting/plot2d/Markers",
            "dojox/charting/axis2d/Default",
            "dojo/domReady!"],
        function(Chart,theme,Columns,Markers,Default,domReady) {
            // Define the data
             var chartData = [5100,1200,2500,]; 
            //Create the chart within it's "holding" node

            var chart = new Chart("chartNode",{
                title: "Reports",
            titlePos: "top",
            titleGap: 30,
            titleFont: "normal normal normal 25pt Arial",
            titleFontColor: "black"
          }); 


            // Set the theme
        chart.setTheme(theme); 

           // Add the only/default plot
            chart.addPlot("default", {
            type: "Columns",
            markers: false,
            labels: true,
            stroke: {color: "red", width: 15}, 
            labelStyle: "outside", 
            gap:15 
    });
    chart.addAxis("x",{fixLower:"minor",natural:true,font:"normal normal 2pt Arial",
                            labels:[{value:1,text:"Daily"},
                                   {value:2,text:"Weekly"},
                                   {value:3,text:"Monthly"}], rotation: -90});    

       chart.addAxis("y", { vertical: true, fixLower: "major", fixUpper: "major",includeZero:true });

      // Add the series of data
       chart.addSeries("Overall NIP Progress",chartData);

      // Render the chart!
       chart.render();
    });

  </script>
</head>
  <body class="claro">
   <div id="chartNode" style="width: 400px; height: 240px; margin: 0px 0px 0px 0px;">
   </div>
  </body>
</html>

0 个答案:

没有答案