TheChance101 / AAY-chart

A chart library for Compose Multiplatform
MIT License
539 stars 39 forks source link

xAxisData not showing. #91

Open mrabbi-hishabee opened 1 year ago

mrabbi-hishabee commented 1 year ago

Details: I use this library in an XML-based project. It works fine but xAxisData data not showing.

Example: image

Code: @Composable fun BarChartSample(xAxisData: List, testBarParameters: List) { xAxisData.toString().logDebug("RABBI") BarChart( legendPosition = LegendPosition.DISAPPEAR, chartParameters = testBarParameters, barCornerRadius = 2.dp, gridColor = Color.LightGray, xAxisData = xAxisData, isShowGrid = true, showXAxis = true, showYAxis = true, animateChart = true, showGridWithSpacer = true,

    yAxisStyle = TextStyle(
        fontSize = 12.sp,
        color = Color.Gray,
    ),
    xAxisStyle = TextStyle(
        fontSize = 12.sp,
        color = Color.Gray,
        fontWeight = FontWeight.W400
    ),
    barWidth = 20.dp
)

}

amnah44 commented 1 year ago

Unfortunately, this is an issue in our library we will fix it in the next release.

MahmoudMabrok commented 1 year ago

@amnah44 could you share list of issues will be fixed in next release and expected date ?

jalalaghazadeh commented 1 year ago

Unfortunately, this is an issue in our library we will fix it in the next release.

by reading code-base, it's obvious that you decide to stop drawing xDataAxis but I don't realize why you should do that (may be there was a bug in 'xAxisDrawing'):

if (showXAxis) {
        if (!isFromBarChart) {
            xAxisDrawing(
                xAxisData = xAxisData,
                textMeasure = textMeasure,
                xAxisStyle = xAxisStyle,
                specialChart = specialChart,
                upperValue = upperValue,
                xRegionWidth = xRegionWidth
            )
        }
    }

where 'isFromBarChart' is always true!

could you please fix it?

amnah44 commented 1 year ago

@MahmoudMabrok Most of our team members are college students so we fix this issue in our vacation or free time, so I can't give you an expected date for next release but we are trying to fix all this issue here before new year. and thanks for your ask.

amnah44 commented 1 year ago

@MahmoudMabrok Thanks for your question and I would like to clarify that we are making this class as a base class able to use for all schemes of our charts now and in the future and we are fixing the UI, not the code issue because every team has plans, goals, ideas and decisions.