Scriptcase折线图Y轴刻度问题

问题描述 投票:0回答:1

任何人都知道如何在脚本框中的折线图中调整y轴?下面的图像显示了问题:我希望Scriptcase自动调整Y轴刻度 - 可能从840到1k,而不是从0开始并以1k结束。我找了这个选项,但找不到任何答案。谢谢,enter image description here

charts fusioncharts
1个回答
1
投票
    You can explicitly set y-axis min and max value using yAxisMinValue and yAxisMaxValue attribute at the chart object level for example : 

    "chart": {
            "yAxisMinValue":"840",
            "yAxisMaxValue":"1000"
          }

    For details please check this snippet - 

 FusionCharts.ready(function() {
  var visitChart = new FusionCharts({
    type: 'line',
    renderAt: 'chart-container',
    width: '700',
    height: '400',
    dataFormat: 'json',
    dataSource: {
      "chart": {
        "yAxisMinValue":"840",
        "yAxisMaxValue":"1000"
      },
      "data": [{
          "label": "Mon",
          "value": "899"
        },
        {
          "label": "Tue",
          "value": "952"
        },
        {
          "label": "Wed",
          "value": "963"
        },
        {
          "label": "Thu",
          "value": "874"
        },
        {
          "label": "Fri",
          "value": "862"
        },
        {
          "label": "Sat",
          "value": "906"
        },
        {
          "label": "Sun",
          "value": "999"
        }
      ]
    }
  });

  visitChart.render();
});
© www.soinside.com 2019 - 2024. All rights reserved.