c# blazer project (vs2019) .razor files calling chart control missing reference RRS feed

  • Question

  • User312077914 posted

    Hi, I am starting into blazor and have a sample blazor project running.

    I want to add a chart control to a .blazor file, but I am getting a missing reference error.

    Does this mean that I can't call the chart control this way ?



    @using System.Web

    var myChart = new Chart(width: 600, height: 400)
    .AddTitle("Chart Title")
    name: "Employee",
    xValue: new[] { "Peter", "Andrew", "Julie", "Mary", "Dave" },
    yValues: new[] { "2", "6", "4", "5", "3" })

    Severity Code Description Project File Line Suppression State Suppression State
    Error CS0246 The type or namespace name 'Chart' could not be found (are you missing a using directive or an assembly reference?) BlazorApp1 C:\Users\xxx\source\repos\BlazorApp1\BlazorApp1\Pages\Component.razor

    Tuesday, October 15, 2019 8:05 PM

All replies