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

LineChart Labels #163

Open
Lexical-Luke opened this issue Dec 20, 2023 · 2 comments
Open

LineChart Labels #163

Lexical-Luke opened this issue Dec 20, 2023 · 2 comments

Comments

@Lexical-Luke
Copy link

Lexical-Luke commented Dec 20, 2023

I'm trying to place the datetime as labels on my graph. I can add a label by using the Tooltip with the at positioning but it only shows the value. How can I achieve this functionality?

I have tried the code below but it shows a blank label until I use the Cursor, then the timestamp flashes but the Tooltip DatetimeText points to the time at the cursor, not to the at={} point.

Help would be much appreciated.

<LineChart.Tooltip at={1}>
  <LineChart.DatetimeText
    options={{
      hour: "numeric",
      minute: "numeric",
    }}
  />
</LineChart.Tooltip>
@cihangir-mercan
Copy link

hey, any solution on this? @Lexical-Luke

@cihangir-mercan
Copy link

I did this with custom view:

    <LineChart.Tooltip
                      at={minIndex}
                      position="bottom"
                      cursorGutter={-32}
                    >
      <View style={styles.tooltipWrapper}>
        <Text style={styles.tooltipLabel}>
          En Düşük Değer:
        </Text>
        <Text style={styles.tooltipPrice}>
          {minMaxPrice.minPrice?.price}
        </Text>
      </View>
    </LineChart.Tooltip>

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