none
Type 'System.Web.UI.DataVisualization.Charting.Chart' is not defined. RRS feed

  • Pergunta

  • No WebDeveloper na toolbox, aba Data opção chart arrastei para um webform e configurei SQLDataSource com um banco e o no Chart associei o DataSource configurando com uma tabela e os campos para X e Y do Chart, mas estou me deparando com o erro:Type 'System.Web.UI.DataVisualization.Charting.Chart' is not defined.

    Alguém tem alguma sugestão para a definição deste gráfico?

    quinta-feira, 2 de agosto de 2012 13:58

Todas as Respostas

  • Dê uma olhada neste link:

    http://www.codeproject.com/Questions/384555/Type-DataVisualization-Charting-Chart-is-not-defin

    Verifique asa referências dos assemblies.

    quinta-feira, 2 de agosto de 2012 14:08
  • Valeu Murilo,

    Estou perdido ainda!

    No Web Config a "assemblies" conforme referido no link está conforme abaixo, assim como ao clicar sobre o erro:
    Web Config:
    <assemblies>
            <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          </assemblies>

    Click no erro:
    '------------------------------------------------------------------------------
    ' <auto-generated>
    '     This code was generated by a tool.
    '
    '     Changes to this file may cause incorrect behavior and will be lost if
    '     the code is regenerated.
    ' </auto-generated>
    '------------------------------------------------------------------------------

    Option Strict On
    Option Explicit On


    Partial Public Class Graficos

        '''<summary>
        '''form1 control.
        '''</summary>
        '''<remarks>
        '''Auto-generated field.
        '''To modify move field declaration from designer file to code-behind file.
        '''</remarks>
        Protected WithEvents form1 As Global.System.Web.UI.HtmlControls.HtmlForm

        '''<summary>
        '''SqlDataSource1 control.
        '''</summary>
        '''<remarks>
        '''Auto-generated field.
        '''To modify move field declaration from designer file to code-behind file.
        '''</remarks>
        Protected WithEvents SqlDataSource1 As Global.System.Web.UI.WebControls.SqlDataSource

        '''<summary>
        '''Chart1 control.
        '''</summary>
        '''<remarks>
        '''Auto-generated field.
        '''To modify move field declaration from designer file to code-behind file.
        '''</remarks>
        Protected WithEvents Chart1 As Global.System.Web.UI.DataVisualization.Charting.Chart
    End Class

    quinta-feira, 2 de agosto de 2012 14:23