在Jqplot栏上显示值

时间:2014-03-07 20:26:57

标签: jqplot

我有四个数组,其中我想将三个数组显示为条形数据,第四个数组显示条形图的当前值

var AlertArray= {1,2,0,2,2,3};
var TargetArray={1,2,2,2,2,3};
var MaxArray={1,1,2,22,22,22};
var Current Array={0.5,0,0,0,0,22};
plot3 = $.jqplot('chart3', [AlertArray, TargetArray, MaxArray], {
        stackSeries: true,
        captureRightClick: true,
        seriesDefaults: {
            renderer: $.jqplot.BarRenderer,
            rendererOptions: {
                barMargin: 5,
                varyBarColor: true,
                barWidth: 30,
                highlightMouseDown: true
            },
            pointLabels: { show: true}
            //, labels: [CurrentArray]
        },
        series: [
         { label: 'ALERT' },
         { label: 'TARGET' },
         { label: 'MAX' },
        ],
        axes: {
            xaxis: {
                renderer: $.jqplot.CategoryAxisRenderer
            },
            yaxis: {
                padMin: 0
            }
        },
        //highlighter: {
        //    tooltipContentEditor: CurrentArray,
        //},
        seriesColors: ["#00FF00", "#FFFF00", "#FF0000"],
        legend: {
            show: true,
            location: 'e',
            placement: 'outside'
        }
    });
    $('#chart3').bind('jqplotDataClick',
      function (ev, seriesIndex, pointIndex, data) {
          $('#info3').html('series: ' + seriesIndex + ', point: ' + pointIndex + ', data: ' + data);
      }
    );
});

现在AlertArray,TargetArray,MaxArray将显示在一个栏中,我想显示从当前数组到每个栏的受尊重的当前值,jqplot中有没有办法?请帮帮我

0 个答案:

没有答案