Jump to content
Sign in to follow this  
drcc

Grafico WPF

Recommended Posts

drcc

Boas,

Precisava de uma ajudinha... eu estou a tentar criar um gráfico, intitulado por "gráfico Pizza" era o seguinte, não sei porquê não mostra as legendas... tantoneste tipo de gráfico como em outros....

Fica aqui o código que usei e uma imagem:

 <DVC:Chart Canvas.Top="80" Canvas.Left="10" Name="mcChart"   Width="400" Height="250"
           Background="Transparent" Margin="12,12,266,272">
            <DVC:Chart.Series>
                <DVC:PieSeries  Title="Pontos" IndependentValueBinding="{Binding Path=Key}" DependentValueBinding="{Binding Path=Value}">
                </DVC:PieSeries >
            </DVC:Chart.Series>
        </DVC:Chart>

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        DirectCast(mcChart.Series(0), PieSeries).ItemsSource = _
                    New KeyValuePair(Of String, Integer)() {New KeyValuePair(Of String, Integer)("Flamento", 67),
                    New KeyValuePair(Of String, Integer)("Internacional", 85),
                    New KeyValuePair(Of String, Integer)("São Paulo", 45),
                    New KeyValuePair(Of String, Integer)("Cruzeiros", 62),
                    New KeyValuePair(Of String, Integer)("Palmeiras", 62),
                    (New KeyValuePair(Of String, Integer)("Avai", 57))}
    End Sub

retirado de: http://www.macoratti.net/09/12/wpf_graf1.htm

e o que acontece é isto:

semttulogi.png

Cumprimentos.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.