AAChartModel / AAChartCore

📈📊☕️☕️☕️An elegant modern declarative data visualization chart framework for Android. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types.极其精美而又强大的 Android 数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Y轴重定义值问题

ls895977 opened this issue · comments

重新设置Y轴参数,类似于ios:yAxisTickPositionsSet方法
根据 上一个问题设置

    val aaOptions: AAOptions = aaChartModel.aa_toAAOptions()
        val yAxis = AAYAxis()
        yAxis.tickPositions = arrayOf(
            "0",
            "20",
            "40",
            "60",
            "80",
            "100"
        )
        yAxis.title(AATitle().text(""))
        yAxis.min(0)
        yAxis.max(100)
        yAxis.tickInterval(20)
        aaOptions.yAxisArray(arrayOf(yAxis))
        mBinding.AAChartView.aa_drawChartWithChartModel(aaChartModel)

y轴不生效问题

commented

这个时候, 你应该调用 AAChartView 的绘图方法是:

    public void aa_drawChartWithChartOptions(final AAOptions chartOptions) 
commented
mBinding.AAChartView.aa_drawChartWithChartModel(aaChartModel)

这个方法应该可以直接删除了, 否则你就是调用了两次绘制图表的方法, 不是很有必要.