Home

Awesome

Scale

NPM Version Download Month Download Total

alt text

Angular plugin for building scale of items. Chart ruler completely on HTML/CSS/JS. Bar chart, line chart, calendar view visualisation. Diagram, graph, pyramid visualisation of large datasets. Showreel. The source for this module is in the main repo. Please create issues and pull requests.

alt text

Inspired by kinopoisk.ru chart written using Adobe Flash. But this chart is just on HTML/CSS without using libraries. Feel free for contribute.

alt text

Install

bower install angular-scale 
npm install angular-scale 

Use

<!DOCTYPE html>
<html ng-app="myApp">
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="../scale.css">
	</head>
	<body ng-controller="main">
		<scale data="data" 
			   width="50" 
			   height="10"
			   box-size="14"
			   line="true"
			   theme="default">
		</scale>

		<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
		<script src="../scale.js"></script>
		<script src="./index.js"></script>
	</body>
</html>
angular.module('myApp', ['scale']).controller('main', ['$scope', function($scope) {
	$scope.data = [];

	var SCALE_WIDTH = 50,
	    SCALE_HEIGHT = 10;

	for (var i=0; i < SCALE_WIDTH; i++) {
		var value = Math.floor(Math.random() * SCALE_HEIGHT + 1);

		$scope.data.push({
			value: value, //Value from 1 to SCALE_HEIGHT
			title: (i + 1) + " item" //Description
		});
	}
}]);

Options

<scale data="data" 
	   width="50" 
	   height="10"
	   box-size="14"
	   line="true"
	   theme="default">
</scale>

alt text

alt text

alt text

Please check the example folder to see how it's going on practice.

Themes

alt text

Changelog

License

Copyright (c) 2016 Kirill Stepkin

Inspired by kinopoisk.ru chart.

npm