ChartJS.Helpers.MVC 3.3.1

dotnet add package ChartJS.Helpers.MVC --version 3.3.1
NuGet\Install-Package ChartJS.Helpers.MVC -Version 3.3.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ChartJS.Helpers.MVC" Version="3.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ChartJS.Helpers.MVC --version 3.3.1
#r "nuget: ChartJS.Helpers.MVC, 3.3.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ChartJS.Helpers.MVC as a Cake Addin
#addin nuget:?package=ChartJS.Helpers.MVC&version=3.3.1

// Install ChartJS.Helpers.MVC as a Cake Tool
#tool nuget:?package=ChartJS.Helpers.MVC&version=3.3.1

ChartJS.Helpers.MVC

Wrapper to generate charts using the popular latest Chart.Js library (http://www.chartjs.org). It also provides Asp.Net MVC HtmlHelper extension method for generating charts.

Samples for all types of chart can be found at https://github.com/ritesh28393/ChartJS.Helpers.MVC/tree/master/SampleMVC

Mix(line and bar) chart

ChartTypeMix MixChart = new ChartTypeMix()
            {
                Data = new MixData()
                {
                    Labels = new string[] { "January", "February", "March", "April", "May", "June", "July" },
                    Datasets = new MixDataSets[]
                    {
                        new MixDataSets()
                        {
                            Label = "Dataset Bar 1",
                            BackgroundColor = "green",
                            BorderColor = "green",
                            BorderWidth = 1,
                            LinearData = new int[]{ -63, -64, 34, 43, -56, 12, 70 }
                        },
                        new MixDataSets()
                        {
                            Label = "Dataset Bar 2",
                            BackgroundColor = "blue",
                            BorderColor = "blue",
                            BorderWidth = 1,
                            LinearData = new int[]{ 15, -54, 45, 24, -50, 43, 36 }
                        }
                        ,
                        new MixDataSets()
                        {
                            Type = ConstantType.LINE,
                            Label = "Dataset Line 3",
                            BackgroundColor = "rgba(255, 0, 0, 0.5)",
                            BorderColor = "red",
                            BorderWidth = 1,
                            LinearData = new int[]{ 5, 54, 40, 0, 50, -43, 36 }
                        }
                    }
                },
                Options = new BarOptions()
                {
                    Title = new ChartOptionsTitle()
                    {
                        Display = true,
                        Text = new string[] { "Chart.js Mix Chart" }
                    },
                    Legend = new ChartOptionsLegend()
                    {
                        Position = ConstantPosition.TOP,
                    },
                    Tooltips = new ChartOptionsTooltip()
                    {
                        Mode = ConstantMode.INDEX,
                        Intersect = true
                    }
                }
            };

            ViewBag.MixChart = new MvcHtmlString(chart.Draw("myMixChart"));
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.3.1 12,262 11/16/2017
3.1.1 1,614 11/7/2017
2.1.1 1,614 10/22/2017
1.0.0 1,996 10/18/2017

updated to work with latest chartjs 2.7.1