chartjs

Externs of Chart.js for Haxe - Simple, clean and engaging charts for designers and developers
https://github.com/adireddy/haxe-chart

To install, run:

haxelib install chartjs 1.0.2 

See using Haxelib in Haxelib documentation for more information.

README.md

Haxelib Version Build Status Built with Grunt

logo

Externs of Chart.js for Haxe - Simple, clean and engaging charts for designers and developers

Installation

haxelib install chartjs

Demo

Look at the samples folder for the source code of above example.

Usage


import chart.defaults.Global;
import chart.Chart;

import js.html.CanvasRenderingContext2D;
import js.html.CanvasElement;
import js.Browser;

class Main {

	var data = {
		labels: ["January", "February", "March", "April", "May", "June", "July"],
		datasets: [
			{
				label: "My First dataset",
				fillColor: "rgba(220,220,220,0.5)",
				strokeColor: "rgba(220,220,220,0.8)",
				highlightFill: "rgba(220,220,220,0.75)",
				highlightStroke: "rgba(220,220,220,1)",
				data: [65, 59, 80, 81, 56, 55, 40]
			},
			{
				label: "My Second dataset",
				fillColor: "rgba(151,187,205,0.5)",
				strokeColor: "rgba(151,187,205,0.8)",
				highlightFill: "rgba(151,187,205,0.75)",
				highlightStroke: "rgba(151,187,205,1)",
				data: [28, 48, 40, 19, 86, 27, 90]
			}
		]
	};

	public function new() {
		var canvas:CanvasElement = Browser.document.createCanvasElement();
		Browser.document.body.appendChild(canvas);

		Global.responsive = true;

		var ctx:CanvasRenderingContext2D = canvas.getContext("2d");
		var barChart = new Chart(ctx).Bar(data);
	}

	static function main() {
		new Main();
	}
}

Licensing Information

MIT license

This content is released under the MIT License.

Chart.js is written by Nick Downie and licensed under the MIT License.

Contributors
adireddy
Version
1.0.2
Published
2 years ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github