This question is locked. New answers and comments are not allowed.
I have a chart in a user control and I want to have my page contain that user control view at a particular size. Unfortunately, when I set the height & width of the view, it just affects the view size and doesn't resize the chart to that size. How can I make my chart resize to the size of what the parent page is telling it to be?
On my main page, I have this:
And in my user control markup I have this:
On my main page, I have this:
| <Views:SeasonRevenueBreakdown Height="200" Width="300" Grid.Column="0" Grid.Row="1" /> |
And in my user control markup I have this:
| <StackPanel Background="Black" Orientation="Vertical"> |
| <telerikChart:RadChart x:Name="RevenuePie" Height="450" Width="640" > |
| <telerikChart:RadChart.DefaultView> |
| <chart:ChartDefaultView> |
| <chart:ChartDefaultView.ChartArea> |
| <chart:ChartArea LegendName="CustomLegend"> |
| <chart:ChartArea.DataSeries> |
| <chart:DataSeries> |
| <chart:DataSeries.Definition> |
| <chart:PieSeriesDefinition /> |
| </chart:DataSeries.Definition> |
| <chart:DataPoint LegendLabel="1" LabelFormat="#%" YValue="70" /> |
| <chart:DataPoint LegendLabel="2" LabelFormat="#%" YValue="16" /> |
| <chart:DataPoint LegendLabel="3" LabelFormat="#%" YValue="4" /> |
| <chart:DataPoint LegendLabel="4" LabelFormat="#%" YValue="7" /> |
| <chart:DataPoint LegendLabel="5" LabelFormat="#%" YValue="3" /> |
| </chart:DataSeries> |
| </chart:ChartArea.DataSeries> |
| </chart:ChartArea> |
| </chart:ChartDefaultView.ChartArea> |
| <chart:ChartDefaultView.ChartLegend> |
| <chart:ChartLegend x:Name="CustomLegend" /> |
| </chart:ChartDefaultView.ChartLegend> |
| <chart:ChartDefaultView.ChartTitle> |
| <chart:ChartTitle Content="Season Revenue Breakdown" /> |
| </chart:ChartDefaultView.ChartTitle> |
| </chart:ChartDefaultView> |
| </telerikChart:RadChart.DefaultView> |
| </telerikChart:RadChart> |
| <Button Height="27" Content="Save Chart" Click="Button_Click" /> |
| </StackPanel> |