Coder Social home page Coder Social logo

presentation-2020-01-ndcblazorcomponentlibraries's Introduction

Demo.BlazorChartist

This is a demonstration of a Blazor components package. It's not intended for actual use, because the feature set is very minimal. If you want to build a real 'chartist' package based on this, feel free to go ahead!

Usage

  1. In a Blazor Server or Blazor WebAssembly project, add a reference to the Demo.BlazorChartist package.

  2. In your _Imports.razor file, add the following statements:

@using BlazorChartist
@using BlazorChartist.Data
  1. In your _Host.cshtml (for Blazor Server) or index.html (for Blazor WebAssembly) file, add the following tags somewhere before the reference to the Blazor .js file:
<link href="_content/Demo.BlazorChartist/chartist.min.css" rel="stylesheet" />
<script src="_content/Demo.BlazorChartist/BlazorChartist.js"></script>

You're now ready to use the package. For example, inside a .razor file, add:

<Chart Type="ChartType.Line" ShowArea="true" Labels="@(new[] { "Monday", "Tuesday", "Wednesday" })">
    <Series Values="@(new double[] { 15, 25, 17 })" />
    <Series Values="@(new double[] { 33, 6, 24 })" />
</Chart>

<Chart Type="ChartType.Bar" Labels="@(new[] { "Australia", "Egypt", "Paraguay", "Zambia" })">
    <Series Values="@(new double[] { 8500, 7280, 2940, 13310 })" />
</Chart>

Notes

This is not intended to be a complete implementation of the Chartist API. The main focus is on demonstrating aspects of package creation.

presentation-2020-01-ndcblazorcomponentlibraries's People

Contributors

stevesandersonms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.