Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

brainee/g2-mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

6 Commits

Repository files navigation

g2-mobile

the mobile version of g2

G2-mobile 是G2的一个子集,提供了常规图表满足移动端需求。它更轻量、更简洁。

G2-mobile is a subset of G2, provides a regular graph to meet the needs of mobile terminal.It is more lightweight and more concise.

Want to learn more? See the tutorial.

For examples, see the demo gallery.

Install

npm install g2-mobile

Usage

var GM = require('g2-mobile');

Example

image

GM.Global.pixelRatio = 2;
var data = [
 {"tem":10,"city":"tokyo"},
 {"tem":4,"city":"newYork"},
 {"tem":3,"city":"berlin"}
 ];
var chart = new GM.Chart({
 id: 'c1'
});
chart.source(data, {
 tem: {
 tickCount: 5
 }
});
chart.axis('city', {
	label:{
		font:'14px'
	},
 grid: null
});
chart.axis('tem', {
	label:{
		font:'14px'
	}
});
chart.interval().position('city*tem').color('city');
chart.render();

More details at G2 site.

About

the mobile version of g2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /