AAY-chart icon indicating copy to clipboard operation
AAY-chart copied to clipboard

Request for Improved Popup Alignment in Chart Interaction

Open mjovanovic9999 opened this issue 2 years ago • 2 comments

When clicking on a chart, a popup displaying the value of the selected point appears. However, there is an issue with the alignment of the popup content.

image

Is it possoble to support custom composable elements within the popup content or, at the very least, the ability to use custom strings for improved multilanguage support. This enhancement would greatly enhance the usability of the chart interaction feature.

Thank you for considering this improvement request!

mjovanovic9999 avatar Sep 24 '23 21:09 mjovanovic9999

Also, text is behind the line. Additionaly, line is wrongly drawn when using LineType.CURVED_LINE :

Also when interacting with the chart, we've encountered two issues:

  • Popup appears behind the chart line, making it difficult to read and interact with the chart effectively.
  • When utilizing LineType.CURVED_LINE, the line rendering behaves unexpectedly, leading to incorrect visual representations in the chart.

image

Full code:

val testLineParameters: List<LineParameters> = listOf(
    LineParameters(
        label = "Earnings",
        data = listOf(100.0, 40.33, 86.232, 88.0, 90.0,60.0, 80.6, 40.33, 86.232, 88.0, 90.0),
        lineColor = Color(0xFFFF7F50),
        lineType = LineType.CURVED_LINE,
        lineShadow = true
    ),
)

LineChart(
    modifier = modifier.fillMaxSize(),
    linesParameters = testLineParameters,
    isGrid = true,
    xAxisData = listOf( "-1", "0", "1", "2", "20","2015", "26", "27", "2", "29", "2"),
    animateChart = true,
    showGridWithSpacer = true,
    yAxisStyle = TextStyle(
        fontSize = 14.sp,
        color = Color.Gray,
    ),
    xAxisStyle = TextStyle(
        fontSize = 14.sp, color = Color.Gray, fontWeight = FontWeight.W400,
    ),
    oneLineChart = false,
    gridOrientation = GridOrientation.VERTICAL,
)

mjovanovic9999 avatar Sep 24 '23 21:09 mjovanovic9999

soon in the next release, we will put all of this in our mind to improve it

AndrewAboalhana avatar Sep 26 '23 15:09 AndrewAboalhana