【问题标题】:How to remove axis, and other information from Bar Chart?如何从条形图中删除轴和其他信息?
【发布时间】:2014-10-17 11:26:45
【问题描述】:

我需要画一个折线图,但只是一个没有轴、值​​等的折线图。只有最后的图形和百分比。

Q:如何把图中的所有项去掉,标明坐标轴、坐标轴等,只需要留下折线图和兴趣即可。

$('#audience').jqChart({
                legend: { visible: false },
                border: { visible: false },
                title:
                {
                    text: 'Chart Title',
                    font: '12px sans-serif',
                    lineWidth: 1,
//                    strokeStyle: 'black',
                    fillStyle: 'white'
                },
                animation: { duration: 1 },
                series: [
                    {
                        pointWidth: 0.2,
                        type: 'bar',
                        fillStyle: '#7fbbe5',
                        data: [['A', 33]],
                        labels: {
                            stringFormat: ' %s %%',
                            valueType: 'dataValue',
                            font: '11px sans-serif',
                            fillStyle: 'white'
                        },
                        tickOptions: {
                            showGridline: false
                        }
                    },
                    {
                        pointWidth: 0.2,
                        type: 'bar',
                        fillStyle: '#92b5c7',
                        data: [['A', 67]],
                        tickOptions: {
                            showGridline: false
                        },
                        labels: {
                            stringFormat: ' %s %%',
                            valueType: 'dataValue',
                            font: '11px sans-serif',
                            fillStyle: 'white'
                        }
                    }
                ]
            });

我有一张图片,我在哪里展示,我有什么,我需要什么: http://i57.tinypic.com/2h3x3yx.jpg

【问题讨论】:

    标签: javascript jquery bar-chart jqchart


    【解决方案1】:

    你可以拼接jqChart Axes -

     var axes = $('#jqChartDiv').jqChart('option', 'axes');
    //remove all series
    axes.splice(0, axes.length );
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-22
      • 2011-09-29
      • 2023-03-24
      • 2017-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-16
      相关资源
      最近更新 更多