ASP.NET Core MVC Controls | ComponentOne
In This Topic
    Scaffolding
    In This Topic

    The steps to scaffold ComponentOne Sunburst chart for ASP.NET MVC are as follows:

    1. Add a new class to the Models folder (for example: HierarchicalData.cs).  For more information on adding a new model, see Quick Start: Add data to Sunburst topic.
    2. In the Solution Explorer, right-click the project name and select Add|New Scaffolded Item. The Add Scaffold wizard appears.

    3. In the Add Scaffold wizard, select Common and then select C1 Scaffolder from the right pane.


      You can also select Common|MVC|Controller or Common|MVC|View and then C1 Scaffolder to add only a controller or a view.

    4. Click Add.

    5. In the Add Scaffold dialog, select Sunburst control, and then click Next.


      The C1 ASP.NET MVC Sunburst wizard appears with the General tab selected by default.

    6. In the General tab, specify the model details as follows:

      1. Enter the Controller Name and View Name.
      2. Select Model Class from the drop-down list. In our case, we select HierarchicalData to populate data in Sunburst chart.
      3. Select Data Context Class from the drop-down list. In our case, we select C1NWindEntities.
      4. In the Binding Name section, select Year, Quarter, and Month check boxes.
      5. In the Binding drop-down, select a column to bind it with your Sunburst chart. In our case, we have selected Value.


    7. Click Add. You will see that the Controller and View for the selected model are added to your project. Once the code is generated, you can run the project using the F5 button.

      Output