How to not show Grid Lines on NumericalAxis3D when SfChart3D SecondaryAxis property value is binded to a RangeAxisBase3D type value
Hello,
I am creating a SfChart3D where the SecondaryAxis property is binded to a RangeAxisBase3D property value. When I apply a xaml style the NumericalAxis3D for the SfChart3D, with ShowGridLines set to False, the grid lines would still appear on the SfChart3D that is creating ColumnSeries3D. However if I bind the SecondaryAxis property to a ChartAxisBase3D type instead, the grid lines will not appear now. Is this an oversight on the binding type values for SfChart3D?
Are you able to provide an example where in xaml, you have a SfChart3D binded to a ViewModel property that is of type RangeAxisBase3D and the grid lines do not show through ShowGridLines = false on NumericalAxis3D?
Hi Eric Nguyen,
Thank you for your inquiry about the RangeAxisBase3D binding with SfChart3D and its ShowGridLines behavior. We are actively reviewing this issue and testing solutions on our end. Please allow us one business day to finalize our findings. We will provide you with a detailed response on July 21st.
Thank you for your patience.
Regards,
Harsha.
Hi Eric Nguyen,
Using ChartAxisBase3D or RangeAxisBase3D should not make a functional difference in this context, as both are abstract base classes. Regardless of which type is used, an instance of a concrete axis type, such as NumericalAxis3D or LogarithmicAxis3D, must be created and assigned.
We suspect the issue might be related to the property
change notification not being triggered correctly for the bound axis element.
Please review the sample code we’ve provided. If our interpretation doesn’t
align with your implementation, feel free to modify it or share additional
details so we can assist you more accurately.
Code Snippet:
Xaml:
|
<Grid Width="500" Height="300"> <chart:SfChart3D SecondaryAxis="{Binding SecondaryAxis}"> <chart:SfChart3D.PrimaryAxis> <chart:DateTimeAxis3D ShowGridLines="False" /> </chart:SfChart3D.PrimaryAxis> <chart:ColumnSeries3D ItemsSource="{Binding ChartData}" XBindingPath="XValue" YBindingPath="YValue" /> </chart:SfChart3D> </Grid> |
C#
|
public class MainViewModel : INotifyPropertyChanged { public ObservableCollection<DataModel> ChartData { get; set; } private RangeAxisBase3D _secondaryAxis; public event PropertyChangedEventHandler PropertyChanged; public RangeAxisBase3D SecondaryAxis { get { return _secondaryAxis; } set { _secondaryAxis = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(SecondaryAxis))); } } public MainViewModel() { SecondaryAxis = new NumericalAxis3D() { ShowGridLines = false, }; ChartData = new ObservableCollection<DataModel> { new DataModel { XValue = 1, YValue = 10, ZValue = 5 }, new DataModel { XValue = 2, YValue = 15, ZValue = 3 }, new DataModel { XValue = 3, YValue = 20, ZValue = 8 } }; } } public class DataModel { public double XValue { get; set; } public double YValue { get; set; } public double ZValue { get; set; } } |
Screenshot:
Regards,
Priyadharshni M
- 2 Replies
- 3 Participants
-
EN Eric Nguyen
- Jul 17, 2025 08:04 PM UTC
- Jul 21, 2025 12:34 PM UTC