是否可以使用jqplot制作此图表?

nee*_*hah 5 javascript css jquery jqplot

是否可以使用jqplot制作图形,如下所示?最接近可能的图表是stacked使用该着色以及点标签是一个问题.

预期产出

这个jsfiddle包含我努力制作这个条形图以及它的图例和点标签.因此可以使它看起来像图像.

var barchart = $.jqplot('chart1', [s1, s2, s3], {
    animate: true,
    grid: {
        background: 'white',
        drawBorder:false,
        shadow: false
    },

    seriesColors: ['#73C6E8', '#F28570', '#727272'],
    seriesDefaults: {
        renderer: $.jqplot.BarRenderer,
        rendererOptions: {
            barPadding: 20,
            barWidth: 25,
            barMargin:10,
            fillToZero: true
        },
        pointLabels: { show: true }
    },
    series: [
        { label: 'USA' },
        { label: 'India' },
        { label: 'South Africa' }
    ],
    legend: {
        show: true,
        placement: 'outsideGrid',
        location:'se',
        background:'white',
        border: 'white',
        fontFamily: 'Gotham Medium',
        fontSize:'12px',
        renderer: $.jqplot.EnhancedLegendRenderer
    },
    axes: {
        xaxis: {
            renderer: $.jqplot.CategoryAxisRenderer,
            ticks:xticks,
            showTicks:false
        },
        yaxis: {
            pad: 1.05,
            ticks: yticks,
            showTicks:false,
            rendererOptions: {drawBaseline: false}
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

Ala*_*ier 0

我相信使用 highchart 会更容易实现:http://www.highcharts.com/demo/column-stacked

这只是堆栈栏示例,您可以自定义所有内容,图例,颜色,大小,标签等。

祝你好运