Hi,
Attached is the chart I have, and I want to minimize the margin for the following, so the x-axis caption can be shown in larger font.
How can I achieve this?
Regards,
Jason
Hello mailtochungg,
To apply spacing between the chart and the legend you can set the Margin property:
<igWebChart:XamWebChart x:Name="XamWebChart1" Margin="50">
This will allow spacing to the left, right, top, and bottom sides of the chart. Also the Margin property can be applied within the Legend instance.
Let me know if you have any questions with this matter. Thank you.
Hi Duane,
Thanks for your reply. But how can I minimze the margin between the ChartPane to the Right Title and Bottom Title? Please see the screen shot below. This is captured from Snoop. The pink border is the size of the ChartPane, and it is taking additional margins in both left, right, and bottom. I have set the left margin to 0 in the Legend instance, but the legend still doesn't touching the right edge.
Thanks for the update on the thread.
For minimizing spacing within the chart and the titles you could set the column and row definitions within the control template of the chart. I have attached a sample that sets up templating.
Thanks for your reply, but that's not what I am looking for. From your example, there is still lots of space left between the axis and the axis title.
I want me get the Left Title closer to the Y-axis, and the Bottom Title closer to the X-asix
Can I modify the template inside <ContentPresenter Name="PART_Default_Chart" Grid.Row="1" Grid.Column="1" />? Is there any margin setting I can use?
no I am fine
Hello,
Do you have any other questions on this matter?
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support
Thanks for your solution, but that create other weird behavior also. It does affect the splitter on the left of the chart.
I end up modifying Scene and Legend to achieve what I want.
<igCA:XamChart.Scene>
<igCA:Scene MarginType="Percent" Margin="0,0,10,0">
<igCA:Scene.GridArea>
<igCA:GridArea MarginType="Percent" Margin="10,10,5,10"/>
</igCA:Scene.GridArea>
</igCA:Scene>
</igCA:XamChart.Scene>
<igCA:XamChart.Legend>
<igCA:Legend UseDataTemplate="True" MarginType="Percent" Margin="88,0,0,0" />
</igCA:XamChart.Legend>
This is just a follow up on the thread if you have any questions in regards to setting the margins as a negative value. In the attached sample demonstrates on setting the Left and Bottom Title to be closer to the x/y axis.
For the Margin property is available on the ContentPresenter. You can set the margins as a negative value (E.g.: -25). Attached is an updated sample on the thread.