combination of two bar chart and two line chart using aChartEngine in Android

好久不见. 提交于 2019-12-01 06:39:51

just change this one

 for (int i = 0; i < days.length; i++) {
    lowestTempSeries.add(i, lowestTemp[i]);
    highestTempSeries.add(i, highestTemp[i]);
   }

with this :

for (int i = 0, j = 0; i < days.length; i++, j += 2) {
        lowestTempSeries.add(j, lowestTemp[i]);
        highestTempSeries.add(j + 0.9, highestTemp[i]);
    }

and also change this :

  for (int i = 0; i < days.length; i++) {
    multiRenderer.addXTextLabel(i, weekDays[i]);
}

with this :

    for (int i = 0, j = 1; i < days.length; i++, j += 2) {
        multiRenderer.addXTextLabel(j - 0.5, weekDays[i]);
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!