官术网_书友最值得收藏!

  • Learning jqPlot
  • Scott Gottreu
  • 98字
  • 2021-09-03 09:49:41

Passing in both x and y values

The next option to pass in data to the chart is to use a two-dimensional array. Our inner array contains individual arrays, which in turn contain the value for x axis followed by the value for y axis. When we include both x and y values, our data points may not increment at a constant interval, as was the case in our previous chart:

   <script>
   $(document).ready(function(){
     var secondPlot = $.jqplot ('secondChart', [[[5,4],[10,7],[15,6],[20,9]]]);
   });
   </script>
   <div id="secondChart" style="width:400px;"></div>

We load this new chart in our web browser, and the results are as shown in the following figure:

主站蜘蛛池模板: 治县。| 苍溪县| 阜康市| 宾阳县| 灵台县| 青川县| 息烽县| 来凤县| 阆中市| 邻水| 邵东县| 合江县| 唐河县| 巢湖市| 宿州市| 共和县| 东安县| 绿春县| 禹州市| 城步| 胶州市| 巴南区| 通辽市| 宝兴县| 昌图县| 澄城县| 阜南县| 莲花县| 茶陵县| 榆林市| 达孜县| 霍城县| 湛江市| 海晏县| 民和| 磐石市| 浑源县| 安吉县| 新野县| 五河县| 肇州县|