Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Improved Popup Alignment in Chart Interaction #90

Open
mjovanovic9999 opened this issue Sep 24, 2023 · 2 comments
Open

Request for Improved Popup Alignment in Chart Interaction #90

mjovanovic9999 opened this issue Sep 24, 2023 · 2 comments

Comments

@mjovanovic9999
Copy link

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
Copy link
Author

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,
)

@AndrewAboalhana
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants