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 with Multiple Axes #151

Closed
mariohik opened this issue Oct 4, 2020 · 3 comments
Closed

LineChart with Multiple Axes #151

mariohik opened this issue Oct 4, 2020 · 3 comments
Labels
question Further information is requested

Comments

@mariohik
Copy link

mariohik commented Oct 4, 2020

Describe your question

How can I set the Type = AxisType.Category?

Which Blazor project type is your question related to?

  • Client-Side

Which charts is this question related to?

Line

Additional context

I'm trying to set the Type = AxisType.Category, but it's readonly.

Property or indexer 'LinearCartesianAxis.Type' cannot be assigned to -- it is read only

@mariohik mariohik added the question Further information is requested label Oct 4, 2020
@mariohik
Copy link
Author

mariohik commented Oct 4, 2020

For help you guys unterstand me, I'm trying to achieve this graph Multiple Axes, with XAxes = Months

@Joelius300
Copy link
Contributor

I'm sorry, I don't quite understand your question. In order to achieve the multiple axis sample, you don't need to explicitly set the axis type.

Just use a single CategoryAxis in the XAxes and two LinearCartesianAxis in the YAxis. Then you can assign an id to an axis and use that same id in your dataset.

Check the source for the sample you sent (via GitHub or the devtools) and you'll see the config used. It's pretty much the same in C#, just different syntax and casing.

@mariohik
Copy link
Author

mariohik commented Oct 6, 2020

Thank you! Worked.

@mariohik mariohik closed this as completed Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants