Необходимо совместить стековый и линейный графики. При построении получается, что линейный график рисуется не от нуля, а от стекового графика. В чем может быть проблема? Код | <html>
<head> <title> </title>
<link href="css/styles.css" type="text/css" rel="stylesheet"> <link rel="stylesheet" href="jquery/css/cupertino/jquery-ui-1.8.7.css" type="text/css"/>
<script type="text/javascript" src="jquery/js/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="jquery/js/jquery-ui-1.8.7.min.js"></script> <script type="text/javascript" src="jquery/js/jquery.ui.datepicker-ru.js"></script>
<!--[if lt IE 9]> <script language="javascript" type="text/javascript" src="jquery/lib/jqplot/excanvas.js"></script><![endif]--> <link rel="stylesheet" type="text/css" href="jquery/lib/jqplot/jquery.jqplot.css"/>
<script type="text/javascript" src="jquery/lib/jqplot/jquery.jqplot.js"></script> <script type="text/javascript" src="jquery/lib/jqplot/plugins/jqplot.cursor.js"></script> <script type="text/javascript" src="jquery/lib/jqplot/plugins/jqplot.dateAxisRenderer.js"></script> <script type="text/javascript" src="jquery/lib/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js"></script> <script type="text/javascript" src="jquery/lib/jqplot/plugins/jqplot.canvasAxisTickRenderer.js"></script>
<script type="text/javascript" src="jquery/lib/jqplot/plugins/jqplot.canvasTextRenderer.js"></script> <script type="text/javascript" src="jquery/lib/jqplot/plugins/jqplot.barRenderer.js"></script>
<script type="text/javascript" src="js/data.js"></script>
<script language="javascript" type="text/javascript"> $(document).ready(function() { $.jqplot.config.enablePlugins = true; plot = $.jqplot('chart1', [data1,data2,data3], { stackSeries: true, seriesDefaults: { renderer: $.jqplot.BarRenderer, rendererOptions:{ barWidth:5 } }, series:[ {}, {}, { renderer:$.jqplot.LineRenderer, lineWidth:2, markerOptions:{ size:5 } } ], axes:{ xaxis:{ renderer:$.jqplot.DateAxisRenderer, rendererOptions:{ tickRenderer:$.jqplot.CanvasAxisTickRenderer }, tickOptions:{ formatString:'%d.%m %H:00', fontSize:'6pt', fontFamily:'Tahoma', angle:-90 }, min:'01.02.2011', tickInterval: '12 hours', autoscale: true }, yaxis:{ min:0, tickOptions:{formatString:'%d'} } },cursor: { showVerticalLine:true, showHorizontalLine:false, showCursorLegend:true, showTooltip: false, zoom:true } }); }); </script> </head>
<body>
<div class="jqPlot" id="chart1" style="height:300px; width:100%;"></div> </body> </html>
|
Присоединённый файл ( Кол-во скачиваний: 6 )
4.PNG 37,30 Kb
|