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

[DOCS] Improve decimator for datetime axis or improve documentation #2285

Open
1 of 7 tasks
FlorianJacta opened this issue Nov 27, 2024 · 2 comments
Open
1 of 7 tasks
Labels
📄 Documentation Internal or public documentation 🖰 GUI Related to GUI 📈 Improvement Improvement of a feature. 🟨 Priority: Medium Not blocking but should be addressed

Comments

@FlorianJacta
Copy link
Member

FlorianJacta commented Nov 27, 2024

Issue Description

The documentation should explain how to make the decimator work with datetime if using datetime is possible. This is either documentation or an issue to improve Taipy.

Right now, the decimation is behaving in a strange way without any good feedback for the user.

from datetime import datetime

import numpy as np
import pandas as pd

from taipy.gui import Gui
import taipy.gui.builder as tgb
from taipy.gui.data.decimator import MinMaxDecimator


x_values = np.linspace(1, 100, 50000)
y_values = np.log(x_values) * np.sin(x_values / 5)
noise_mask = np.random.rand(*y_values.shape) < 0.01
noise_values = np.random.uniform(-0.5, 0.5, size=np.sum(noise_mask))
y_values_noise = np.copy(y_values)
y_values_noise[noise_mask] += noise_values

data = pd.DataFrame({"X": x_values, "Y": y_values_noise})
data["X"] = pd.to_timedelta(data["X"], unit="s") + datetime.now()

decimator = MinMaxDecimator(200)

if __name__ == "__main__":
    with tgb.Page() as page:
        tgb.chart("{data}", type="markers", x="X", y="Y", decimator=decimator)

    gui = Gui(page=page)
    gui.run()

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)

Acceptance Criteria

  • The documentation set as been generated without error.
  • The new text has been passed to a grammatical tool for review.
  • The 100 character length limit has been respected as much as possible.
  • The links and cross-references in the documentation are working.
  • If applicable, screenshots of the new documentation are added to the pull request.
@FlorianJacta FlorianJacta added 📈 Improvement Improvement of a feature. 📄 Documentation Internal or public documentation 🖰 GUI Related to GUI 🟨 Priority: Medium Not blocking but should be addressed labels Nov 27, 2024
@Kritika75
Copy link

Hey @FlorianJacta,

I’d love to work on this issue! Could you please assign it to me?

A little about me -
I’m Kritika, a programmer skilled in HTML, CSS, JavaScript, Python, Django, and Kotlin. I was a top performer in GirlScript Summer of Code 2024, securing rank 58 out of 60,000 participants. During the program, I made 38 pull requests and earned 8 badges

@FlorianJacta
Copy link
Member Author

I think @dinhlongviolin1 would maybe take this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 Documentation Internal or public documentation 🖰 GUI Related to GUI 📈 Improvement Improvement of a feature. 🟨 Priority: Medium Not blocking but should be addressed
Projects
None yet
Development

No branches or pull requests

2 participants