|
-
Oct 14th, 2021, 01:18 PM
#2
Re: Maximum y Achse Chart WPF als Variable
English Speaking forum. Please translate your posts to English.
Translation:
Hello, everyone,
In the coding I have defined a variable as Public, to which I assign a value - myMax.
In the WPF I have a chart to which I want to assign this value as the maximum value for the Y-axis.
So I tried it, but nothing happened. No bars appear at all.
Code:
<cht:Chart Name="populationChart" Title="Kosten" Foreground="DarkBlue" Background="DarkOrange" Margin="10,10,10.286,454.429" >
<cht:Chart.Series>
<cht:ColumnSeries Title="Kosten [€]" Background="DarkBlue" BorderBrush="Black" DependentValuePath="Value" IndependentValuePath="Key" ItemsSource="{Binding}" IsSelectionEnabled="True" >
</cht:ColumnSeries>
</cht:Chart.Series>
<cht:Chart.Axes>
<cht:LinearAxis Orientation="Y" Minimum="0" Maximum="{Binding myMax}" />
</cht:Chart.Axes>
</cht:Chart>
How can I pass the variable here?
Thanks.
"Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|