dir.by  
  Search  
Programming, development, testing
jq Plot - diagrams, graphic lines
What the jqPlot?
  Looked at 4829 times    
 What the jqPlot? 
last updated: 24 November 2018
jqPlot - is a library for drawing graphs, diagrams.
jqPlot uses the library jQuery.

скачать jquery.jqplot.1.0.8r1250.zip
http://www.jqplot.com/download/

пример
http://www.jqplot.com/examples/barTest.php#
Example we look, we test
Пример
  Html  
<html>

     <!-- heading -->
     <head>
          <meta charset="utf-8">
          <title>Example</title>
     </head>

     <!-- page -->
     <body>
          <!-- connect library jQuery (js file) -->
          <script src="https://dir.by/example_lib/jquery/jquery-3.3.1.min.js"></script>

          <!-- connect library jqPlot (js file) -->
          <script type="text/javascript" src="https://dir.by/example_lib/jquery.jqplot.1.0.8r1250/jquery.jqplot.js"></script>

          <!-- connect library jqPlot plugins (js Files) -->
          <script type="text/javascript" src="https://dir.by/example_lib/jquery.jqplot.1.0.8r1250/plugins/jqplot.barRenderer.js"></script>
          <script type="text/javascript" src="https://dir.by/example_lib/jquery.jqplot.1.0.8r1250/plugins/jqplot.categoryAxisRenderer.js"></script>
          <script type="text/javascript" src="https://dir.by/example_lib/jquery.jqplot.1.0.8r1250/plugins/jqplot.pointLabels.js"></script>

          <!-- connect library jqPlot (css file) -->
          <link rel="stylesheet" type="text/css" href="https://dir.by/example_lib/jquery.jqplot.1.0.8r1250/jquery.jqplot.css" />
         
          <!-- HTML Elements -->
          <span id="info1"></span>
          <div id="chart1" style="margin-top:20px; margin-left:20px; width:300px; height:300px;"></div>

          <!-- JavaScript our schedule -->
          <script type="text/javascript">


               $(document).ready(function()
               {
                    $.jqplot.config.enablePlugins = true;
                    var s1 = [2, 6, 7, 10];
                    var ticks = ['a', 'b', 'c', 'd'];

                    plot1 = $.jqplot('chart1', [s1], {
                         // Only animate if we're not using excanvas (not in IE 7 or IE 8)..
                         animate: !$.jqplot.use_excanvas,
                         seriesDefaults:{
                              renderer:$.jqplot.BarRenderer,
                              pointLabels: { show: true }
                              },
                              axes: {
                                   xaxis: {
                                   renderer: $.jqplot.CategoryAxisRenderer,
                                   ticks: ticks
                                   }
                              },
                         highlighter: { show: false }
                    });

                    $('#chart1').bind('jqplotDataClick',
                         function (ev, seriesIndex, pointIndex, data) {
                              $('#info1').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
                         }
                    );
               });
          </script>    

     </body>

</html>
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

  Объявления  
  Объявления  
 
What the jqPlot?

  Ваши вопросы присылайте по почте: info@dir.by  
Яндекс.Метрика