Scriptcase折线图Y轴刻度问题

时间:2018-05-30 11:21:18

标签: charts fusioncharts

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

1 个答案:

答案 0 :(得分: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();
});