Skip to content

Orchard Core module that contains Chart.js and related helpers.

License

Notifications You must be signed in to change notification settings

Lombiq/Orchard-Chart.js

Lombiq Chart.js for Orchard Core

Lombiq.ChartJs NuGet Lombiq.ChartJs.Samples NuGet Lombiq.ChartJs.Tests.UI NuGet

About

An Orchard Core wrapper around the Chart.js library for displaying datasets as various charts.

Do you want to quickly try out this project and see it in action? Check it out in our Open-Source Orchard Core Extensions full Orchard Core solution and also see our other useful Orchard Core-related open-source projects!

Documentation

Display the "Chart" shape like this:

<chart labels="@viewModel.ChartLabels"
       datasets="@viewModel.ChartDataSets"
       options="@viewModel.ChartOptions"
       datalabels="@dataLabelsConfiguration"></chart>

The properties are:

  • ChartType ("type"): String indicating the chart type.
  • Labels ("labels"): An array of strings for the series labels.
  • DataSets ("datasets"): An array of ChartJsDataSet objects, each representing a series.
  • Options ("options"): An object that gets serialized (and property names converted to camelCase) to become the options property of the Chart.js configuration object.
  • BackgroundColor ("background"): A CSS style color string. Default value is "white".
  • WithDataLabels ("datalabels"): If not null, it sets up the Datalabels plugin and its display behavior.

Labels and DataSets are required, the rest is optional.

Dependencies

This module has the following dependencies:

Contributing and support

Bug reports, feature requests, comments, questions, code contributions and love letters are warmly welcome. You can send them to us via GitHub issues and pull requests. Please adhere to our open-source guidelines while doing so.

This project is developed by Lombiq Technologies. Commercial-grade support is available through Lombiq.