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 alternate syntax #5087

Open
lukewis opened this issue Nov 28, 2023 · 2 comments
Open

LineChart alternate syntax #5087

lukewis opened this issue Nov 28, 2023 · 2 comments
Labels

Comments

@lukewis
Copy link

lukewis commented Nov 28, 2023

Proposal

I noticed when creating a line chart that the user MUST specify a value for every increment along the x-axis. In some cases, the user may want to supply only SOME of those values. For example, start at (0,0) and draw a line to (50,100). Calculating the slope of that line (and thus) the value at each increment is pretty arduous. It might be nice to support an alternate syntax (in addition to the existing one)

Example

# Existing
line [1,5,10,20]  # These are y-axis values for EACH x-axis increment

# Proposed
line [(1,1), (50,100)] # These specify actual coordinates so that the user does not have to specify ALL increments.

Screenshots

No response

@lukewis lukewis added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Nov 28, 2023
@sidharthv96 sidharthv96 added Area: Development Graph: XY XY Chart and removed Status: Triage Needs to be verified, categorized, etc labels Nov 29, 2023
@sidharthv96
Copy link
Member

sidharthv96 commented Nov 29, 2023

The proposed syntax looks good.
Let's brainstorm a bit to see if anything else comes up.

CC @subhash-halder

@subhash-halder
Copy link
Contributor

Yes, the syntax is very open so it will be powerful but may confuse many, it would be better if we could come up with a better use case for why we need it.
It would be better if we take more feedback from users, @sidharthv96 can we post it in the Slack group and gather feedback.

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

No branches or pull requests

3 participants