Translate Tx Widget

S├ębastien Janaud - June 3, 2015 - updated june 2017 / Samples

Translate Tx

Tx widget is a control bar with two buttons that perform shift to west or east direction.

Resource : chart source code

Learn : javascript translate plugin sources

Part : Part 1 - Part 2 - Part 3 - Part 4 - Part 5

Translate Tx Widget



var translate = new JenScript.TranslatePlugin({mode : 'x'});
proj.registerPlugin(translate);

var percents = ['0%','50%','100%'];
var colors = ['#34495e','black','#34495e'];
var opacity  = [0.8,0.8,0.8];
var tx = new JenScript.TranslateX({
	width : 60,
	height :  16,
	outlineStrokeColor : '#e74c3c',
	outlineStrokeWidth : 2,
	shader : {percents : percents, colors : colors,opacity:opacity},
	buttonFillColor :  '#f1c40f',
	buttonStrokeWidth : 1,
	buttonRolloverFillColor : '#bdc3c7',
});
translate.registerWidget(tx);

translate.select();