Link to minimal reproduction or a simple code snippet
<LineChart TItem="..." Options="chartOptions">
...
private LineChartOptions chartOptions = new LineChartOptions()
{
Interactions = new ChartInteractions()
{
Intersect = false
},
};
Steps to reproduce
Create a new LineChart
Use the Options property to specify the chartoptions
In the options, set the Interactions property
Notice that the Interactions property is ignored
What is expected?
Settings from the Interactions property should be applied
What is actually happening?
I wanted to have tooltips for a streaming chart. I noticed they only appear when hovering a data point and not the lines, which is quite annoying in a scrolling chart. After some digging, I found out that setting Intersect to false should fix it, but it didn't. The official examples work though.
Further testing confirmed that enabling Intersect via "OptionsObject" works, but not via "Options". The reason most likely is a type in the ChartOptions class: The property is called Interactions, but Interaction is correct.
I was able to find a workaround by inheriting from ChartOptions and adding the Interaction property (without s at the end) in my inherited class:
public class MyLineChartOptions : LineChartOptions
{
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ChartInteractions Interaction { get; set; }
}
This should be fixed though in the Blazorise code, either by renaming the property or by setting json serialization options tso that the property is serialized into the correct name.
Blazorise Version
1.5.3
What Blazorise provider are you running on?
None
Link to minimal reproduction or a simple code snippet
...
Steps to reproduce
What is expected?
Settings from the Interactions property should be applied
What is actually happening?
I wanted to have tooltips for a streaming chart. I noticed they only appear when hovering a data point and not the lines, which is quite annoying in a scrolling chart. After some digging, I found out that setting Intersect to false should fix it, but it didn't. The official examples work though.
Further testing confirmed that enabling Intersect via "OptionsObject" works, but not via "Options". The reason most likely is a type in the ChartOptions class: The property is called Interactions, but Interaction is correct.
I was able to find a workaround by inheriting from ChartOptions and adding the Interaction property (without s at the end) in my inherited class:
This should be fixed though in the Blazorise code, either by renaming the property or by setting json serialization options tso that the property is serialized into the correct name.
What browsers do you see the problem on?
Chrome, Microsoft Edge
Any additional comments?
No response