Comments (10)
I believe the problem is with Ticks property in the axes. The thing is that Blazor have it's own serializer and it is not very good. In this case it will serialize axe as
{
display: false,
ticks: null
}
Now ticks: null
is the problem because chartjs will try to read that because it is specified. It doesn't matter if it's null, it will still try to read it. It's really stupid behavior :/
I cannot do much in the 0.5.x version because that version is still using Blazor 0.7
Blazorise 0.6 is converted to Blazor 0.8 and it has better compatibility with newtonsoft json so maybe I could use that to omit nullable objects from serializing.
from blazorise.
As I feared, the built-in serializer is still in use #7346. I can do as Steve has recommended but it just feels dirty. I think that adding third party libraries to Blazorise is not the path I want to go.
@DaleCam What do you think?
from blazorise.
Hi @stsrki thansks for your consideration with this! How about an option then where we can pass you a string (json object) of the options instead of a ChartOption class? That would be ultimately flexible for users, and you then wouldnt need to keep a ChartOptions object up to date. However if users did want to keep using chart options, they could deserialise that to a json string as a user and pass that to your lib as a stringified json object. What do you think?
from blazorise.
It's not a bad idea and it's pretty easy to implement. But it will definitely be a temporary feature, at least until there is a better serializer implemented in Blazor.
I can add two parameters for charts(data and options), and mark them as Obsolete
so that user can know that it will be removed sometime in the future.
Possible names for parameters:
DataJsonString
OptionsJsonString
from blazorise.
PS. can you tell what version of Blazorise are you using.
0.5,x(for Blazor 0.7) or 0.6(for Blazor 0.8 preview)?
from blazorise.
PS. can you tell what version of Blazorise are you using.
0.5,x(for Blazor 0.7) or 0.6(for Blazor 0.8 preview)?
0.5.x until i have time to upgrade which may be a while!
Thanks so much!
from blazorise.
I have added the feature in both version(0.5x and 0.6 preview). Please try it and let me know how it goes.
from blazorise.
Hi @stsrki,
Its working well! Thank you!
from blazorise.
@stsrki Actually is there anyway to turn Gridlines off currently? No biggie, its just a nicety for me:)
https://www.chartjs.org/docs/latest/axes/styling.html#grid-line-configuration
Actually I can use the new string Options for that too!
from blazorise.
Yes just use string options for now, I will try to add styling options to the new version.
But keep in mind that all new features will be in the v0.6.
from blazorise.
Related Issues (20)
- Change video time HOT 2
- [Bug]: Pen-test fails on CSP: style-src
- [Bug]: I have a problem with use DataGrid and the option of menu HOT 5
- [Bug]: AntDesign - badges colors do not work HOT 1
- [Bug]: Autocomplete keyboard navigation doesn't work for Tailwind
- Change TimeUpdated interval HOT 3
- Tooltip/Overlay for datagrid columns for specific data HOT 1
- [Bug]: FontAwsome icon id not working together with icon size HOT 7
- RichTextEdit: update to Quill v2.0
- Show licensing messages based on a license state
- [Bug]: ModalProvider does not always work
- Allow Theme cascading value to pass across rendermode boundaries HOT 1
- [Bug]: Icon for IconName.FileAlt incorrectly uses fa-file-lines HOT 2
- [Bug] Video DRM ProtectionHttpRequestHeaders issue
- Change video captions HOT 11
- [Bug]: DataGrid - Aggregate on specific column is not correctly moved with multiple groupings
- [Bug]: DatePicker showing calendar at wrong position using Bootstrap 5 HOT 1
- [Bug]: JSBreakpointModule throwing exceptions HOT 4
- Optional characters counter HOT 1
- Datagrid Aggregates for Columns without field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazorise.