如何在图表y移除轴标签? [英] how to remove of y -axis label in chart?

查看:163
本文介绍了如何在图表y移除轴标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请你告诉我,移除标签y轴的标签。我采用融合库做一个简单的图表。
http://www.fusioncharts.com/dev/chart-attributes.html ?图= area2d
我看到一些y轴的标签 0 $,$ 4,$ 12。等等我想删除该标签。我需要显示的图表像这样如图图像[![请在此输入的形象描述] [1]] [1]
http://jsfiddle.net/Tu57h/135/

我们可以证明这对右侧所示图像?

这是我的code
http://jsfiddle.net/Tu57h/135/

  FusionCharts.ready(函数(){
    VAR salesChart =新的FusionCharts({
        类型:'msarea',
        renderAt:表容器,
        宽度:'450',
        高度:'300'
        DATAFORMAT:JSON,
        数据源: {
            图:{
                说明:酒销售,
                subCaption:previous周VS本周
                xAxisName:日,
                数preFIX:$
                paletteColors:#0075c2,#1aaf5d,
                BGCOLOR:#FFFFFF
                showBorder:0,
                showCanvasBorder:0,
                plotBorderAlpha:10,
                usePlotGradientColor:0,
                legendBorderAlpha:0,
                legendShadow:0,
                plotFillAlpha:60,
                showXAxisLine:1,
                axisLineAlpha:25
                showValues​​:0,
                captionFontSize:14,
                subcaptionFontSize:14,
                subcaptionFontBold:0,
                divlineColor:#999999,
                divLineIsDashed:1,
                divLineDashLen:1,
                divLineGapLen:1,
                showAlternateHGridColor:0,
                toolTipColor:#FFFFFF
                toolTipBorderThickness:0,
                toolTipBgColor:#000000,
                toolTipBgAlpha:80后,
                toolTipBorderRadius:2,
                toolTipPadding:5,
            },            类别:
                {
                    类别:
                        {
                            标签:2015年1月
                        },
                        {
                            标签:2015年2月
                        },
                        {
                            标签:2015年3月
                        },
                        {
                            标签:2015年5月
                        },
                        {
                            标签:君2015
                        },
                        {
                            标签:2015年7月
                        },
                        {
                            标签:2015年8月
                        },{
                            标签:2015年9月
                        },{
                            标签:2015年10月
                        }
                        {
                            标签:2015年11月
                        },{
                            标签:DEC 2015
                        }
                    ]
                }
            ]            数据:
                {
                    SERIESNAME:previous周
                    数据:
                        {
                            值:13000
                        },
                        {
                            值:14500
                        },
                        {
                            值:13500
                        },
                        {
                            值:15000
                        },
                        {
                            值:15500
                        },
                        {
                            值:17650
                        },
                        {
                            值:19500
                        }
                    ]
                }
            ]
        }
    })
    .render();
});


解决方案

什么是对图像的右侧显示的是趋势线。在图表设置为0,并添加趋势线:您可以删除与 showYAxisValues​​ y轴的标签

 趋势线:
  {
    行:[
      {
          在startValue:12000,
          色:#1aaf5d
          valueOnRight:1,
          displayvalue:$ 12K
      }
    ]
  }
]

在这里捣鼓 http://jsfiddle.net/Tu57h/138/

could you please tell me remove labels y axis labels .I make a simple chart using fusion library . http://www.fusioncharts.com/dev/chart-attributes.html?chart=area2d I saw some y axis label 0$,4$,12$..etc I want to remove that label .I need to show chart like this as shown in image [![enter image description here][1]][1] http://jsfiddle.net/Tu57h/135/

can we show this on right side as shown in image ?

here is my code http://jsfiddle.net/Tu57h/135/

FusionCharts.ready(function () {
    var salesChart = new FusionCharts({
        type: 'msarea',
        renderAt: 'chart-container',
        width: '450',
        height: '300',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Sales of Liquor",
                "subCaption": "Previous week vs current week",
                "xAxisName": "Day",
                "numberPrefix": "$",
                "paletteColors": "#0075c2,#1aaf5d",
                "bgColor": "#ffffff",
                "showBorder": "0",
                "showCanvasBorder": "0",
                "plotBorderAlpha": "10",
                "usePlotGradientColor": "0",
                "legendBorderAlpha": "0",
                "legendShadow": "0",
                "plotFillAlpha": "60",
                "showXAxisLine": "1",
                "axisLineAlpha": "25",                
                "showValues": "0",
                "captionFontSize": "14",
                "subcaptionFontSize": "14",
                "subcaptionFontBold": "0",
                "divlineColor": "#999999",                
                "divLineIsDashed": "1",
                "divLineDashLen": "1",
                "divLineGapLen": "1",
                "showAlternateHGridColor": "0",
                "toolTipColor": "#ffffff",
                "toolTipBorderThickness": "0",
                "toolTipBgColor": "#000000",
                "toolTipBgAlpha": "80",
                "toolTipBorderRadius": "2",
                "toolTipPadding": "5",
            },

            "categories": [
                {
                    "category": [
                        {
                            "label": "jan 2015"
                        }, 
                        {
                            "label": "feb 2015"
                        }, 
                        {
                            "label": "mar 2015"
                        }, 
                        {
                            "label": "may 2015"
                        }, 
                        {
                            "label": "jun 2015"
                        }, 
                        {
                            "label": "jul 2015"
                        }, 
                        {
                            "label": "aug 2015"
                        },{
                            "label": "sep 2015"
                        },{
                            "label": "oct 2015"
                        }
                        ,{
                            "label": "nov 2015"
                        },{
                            "label": "dec 2015"
                        }
                    ]
                }
            ],

            "dataset": [
                {
                    "seriesname": "Previous Week",
                    "data": [
                        {
                            "value": "13000"
                        }, 
                        {
                            "value": "14500"
                        }, 
                        {
                            "value": "13500"
                        }, 
                        {
                            "value": "15000"
                        }, 
                        {
                            "value": "15500"
                        }, 
                        {
                            "value": "17650"
                        }, 
                        {
                            "value": "19500"
                        }
                    ]
                }
            ]
        }
    })
    .render();
});

解决方案

What's shown on the right side of your image are trendlines. You can remove the y-axis labels with showYAxisValues: "0" in your chart setup, and add trendlines with:

"trendlines": [
  {
    "line": [
      {
          "startvalue": "12000",
          "color": "#1aaf5d",
          "valueOnRight": "1",
          "displayvalue": "$12K"
      }
    ]
  }
]

fiddle here http://jsfiddle.net/Tu57h/138/

这篇关于如何在图表y移除轴标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆