Hello,
I have a problem with my chart: The data don't fill the entire chart area.
As you can see on the picture, the lines take less than 75% of the space.
I don't want to change the size of the chart.I just want to modify the proportion between the red rectangle (on the picture) and the chart size.
Can you help me?
Thank you!
Hi,
Have you tried defining the Axis range?
The xamChart uses a RangeFromZero property which will cause the chart to calculate the minimum value closer to the data points. Or you can manually set the Minimum, Maximum and Unit values.
http://help.infragistics.com/NetAdvantage/WPFDV/2011.2/CLR4.0/?page=xamChart_Modify_the_Axis_Range.html
The XamDataChart has Axis properties of MinimumValue, MaximumValue and Interval.
http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=xamDataChart_Axis_Range.html
Please let me know if you have any questions.
I hadn’t heard back from you. I was wondering if you had further questions.
I still have the problem:
The chart:
I have defined the Maximum
and here is my xaml code:
<igCA:XamChart Margin="5" Theme="Aquarius" Grid.Column="1" DataContext="{Binding .}" x:Name="xamChart" > <igCA:XamChart.Legend> <igCA:Legend MarginType="Percent" Margin="20,90,20,0" /> </igCA:XamChart.Legend> <igCA:XamChart.Axes> <igCA:Axis AxisType="PrimaryY" RangeFromZero="False" Unit="1" /> <igCA:Axis AxisType="PrimaryX" RangeFromZero="False" Unit="1" /> </igCA:XamChart.Axes> <igCA:XamChart.Scene> <igCA:Scene MarginType="Percent" Perspective="100"> <igCA:Scene.GridArea> <igCA:GridArea Background="#FFFCFCFC" MarginType="Percent" Margin="10"> </igCA:GridArea> </igCA:Scene.GridArea> </igCA:Scene> </igCA:XamChart.Scene> <igCA:XamChart.Series> <igCA:Series ChartType="ScatterLine" Label="{Binding ShapingName1}" Fill="Blue" DataSource="{Binding ShapingData1}" DataMapping="ValueX = Time; ValueY = Pressure"> <igCA:Series.Marker> <igCA:Marker Foreground="Transparent" MarkerSize=".7" Type="Circle" Fill="Blue" /> </igCA:Series.Marker> </igCA:Series> <igCA:Series ChartType="ScatterLine" Label="{Binding ShapingName2}" Fill="Green" DataSource="{Binding ShapingData2}" DataMapping="ValueX = Time; ValueY = Pressure"> <igCA:Series.Marker> <igCA:Marker Foreground="Transparent" MarkerSize=".7" Type="Circle" Fill="Green" /> </igCA:Series.Marker> </igCA:Series> </igCA:XamChart.Series> </igCA:XamChart>
thank you for your help.
Let me add a sample that I created with my datasource and your xaml. Obviously I had to make some changes in the binding references and my data doesn’t look quite the same as yours.
I added labels to may charts for reference primarily. I also had to change the chart scene gridArea margin setting in order to eliminate a conflict because of my labels.
I included two charts, one using AutoRange set to true, where the control is automatically calculating the Minimum, Maximum and Unit values. The second chart with the AutoRange set to false, where you must provide the Minimum, Maximum and Unit values.
I added your code to set the maximum value to a calculation in the chart’s loaded event. Your code was calculating from an axis Maximum value that was NaN and so did not provide a valid value. I replaced it by setting the values based on the datasource’s maximum and minimum elevation values.
Take a look and let me know if you have any questions.
I don’t know if you’ve had an opportunity to review my sample.
Please let me know if you have any questions concerning this question?