this.haxis.minimumRender = this.minx;
this.haxis.maximumRender = this.maxx;
this.vaxis.minimumRender = this.miny;
this.vaxis.maximumRender = this.maxy;
// set styles to drawview
dv.fillStyle = fillcolor;
dv.globalAlpha = fillopacity;
// create rectangle path
dv.beginPath();
dv.moveTo(tlx,tly);
dv.lineTo(brx,tly);
dv.lineTo(brx,bry);
dv.lineTo(tlx,bry);
dv.lineTo(tlx,tly);
dv.fill();
//this.closePath();
0 ) {
var colors = []; var j=1;
var rgnstyle = this.style.vaxisstyle['band' + j];
while ( this.style.vaxisstyle['band' + j] ) {
colors.push( rgnstyle.color );
j++;
rgnstyle = this.style.vaxisstyle['band' + j];
}
var tly = this.style.plot.linesize + 1; var colorindex;
for ( var i=1; i < vaxis.getTickMarkPositions().length ; i++ ) {
colorindex = (i-1) % colors.length;
//Debug.write("colorindex,points",colorindex, 0, tly, haxis.width, vaxis.getTickMarkPositions()[i]);
this.renderRect( this.plotareabackground, this.style.plot.linesize, tly, (haxis.width - this.style.plot.linesize + 1), vaxis.getTickMarkPositions()[i], colors[colorindex], 1);
tly = vaxis.getTickMarkPositions()[i] + 1;
}
}
]]>
0 ) {
var graphport = this.plotareabackground; //vaxis
graphport.strokeStyle = this.style.haxisstyle.gridline.color;
graphport.lineWidth = this.style.haxisstyle.gridline.size;
graphport.globalAlpha = this.style.haxisstyle.gridline.opacity;
// graphport.fill();
for ( var i=0; i < vaxis.getTickMarkPositions().length ; i++ ) {
graphport.beginPath();
graphport.moveTo(0, vaxis.getTickMarkPositions()[i] );
graphport.lineTo(haxis.width, vaxis.getTickMarkPositions()[i] );
graphport.stroke();
}
}
]]>
0 ) {
var graphport = this.plotareabackground; //haxis
graphport.strokeStyle = this.style.vaxisstyle.gridline.color;
graphport.lineWidth = this.style.vaxisstyle.gridline.size;
graphport.globalAlpha = this.style.vaxisstyle.gridline.opacity;
// graphport.fill();
for ( var i=0; i < haxis.getTickMarkPositions().length ; i++ ) {
graphport.beginPath();
graphport.moveTo(haxis.getTickMarkPositions()[i], 0 );
graphport.lineTo(haxis.getTickMarkPositions()[i], vaxis.height );
graphport.stroke();
}
}
]]>
this.height ) {
vaxis.setAttribute( "height", (this.height -
(overHeight + this.topMargin + this.bottomMargin) ) );
}
haxis.clear();
haxis.setRightMargin();
overWidth = getAxisOverDimension("vertical");
if( (haxis.width + overWidth + this.leftMargin + this.rightMargin) > this.width ) {
haxis.setAttribute( "width", (this.width -
(this.leftMargin + this.rightMargin + 5) ) );
}
this.xoffset = this.width;
vaxis.setAttribute('x', this.leftMargin );
vaxis.setAttribute('y', this.topMargin );
vaxis.render();
haxis.setAttribute('x', this.leftMargin );
haxis.setAttribute('y', (vaxis.y + vaxis.height) );
haxis.render();
]]>
this["haxis"] = this.getNodeOfClass("horizontalaxis");
this["vaxis"] = this.getNodeOfClass("verticalaxis");
var dataseries = this.getDataSeries();
this.dataSeriesLeaf = dataseries ? dataseries.getDataSeriesLeafs() : [];
this.calcDefaultMinMax();
this.minx = this.defaultminx;
this.maxx = this.defaultmaxx;
this.miny = this.defaultminy;
this.maxy = this.defaultmaxy;
this.adjustOptimizeMinMax();
super.dataload();
if( haxis.type.toUpperCase() == 'LINEAR' ) {
haxis.setAutomaticMinMaxRender( this.minx, this.maxx );
this.setAttribute("minx", haxis.minimumRender);
this.setAttribute("maxx", haxis.maximumRender);
}
if( vaxis.type.toUpperCase() == 'LINEAR' ) {
vaxis.setAutomaticMinMaxRender( this.miny, this.maxy );
this.setAttribute("miny", vaxis.minimumRender);
this.setAttribute("maxy", vaxis.maximumRender);
}
//Categorical Axis - When the axis type is categorical, the axis class only expects one data serie
//The Axis minimun value is 0 and maximum value is the # of Categories -1 for the data serie.
if(this.dataSeriesLeaf[0].getDataColumn(pAxis.columnName) != null){
pAxis.categoricalArray = this.dataSeriesLeaf[0].getDataColumn(pAxis.columnName).values;
}
//Set the minimum and maximum values for this axis.
if( pOrientation.toLowerCase() == 'x' ) {
this.defaultminx = 0;
if(pAxis.categoricalArray != null){
this.defaultmaxx = pAxis.categoricalArray.length - 1;
}
} if( pOrientation.toLowerCase() == 'y' ) {
this.defaultminy = 0;
if(pAxis.categoricalArray != null){
this.defaultmaxy = pAxis.categoricalArray.length - 1;
}
}
this.minx = pMinX;
this.maxx = pMaxX;
this.miny = pMinY;
this.maxy = pMaxY;
0) {
min = arr[0];
}
for(var i = 1; i < arr.length; i++) {
if(arr[i] < min) {
min = arr[i];
}
}
return min;
]]>
0) {
max = arr[0];
}
for(var i = 1; i < arr.length; i++) {
if(max < arr[i]) {
max = arr[i];
}
}
return max;
]]>
actionhelper.changeBound(newminx, newminy, newmaxx, newmaxy, animated, undoable);
actionhelper.undo(duration);
A rectangular chart
This component is Beta quality and is subject to revision
parent.setAttribute("isdrawing", true);
parent.setAttribute("isdrawing", false);
0)
{
this["origminx"] = new Number(chart.minx);
this["origminy"] = new Number(chart.miny);
this["origmaxx"] = new Number(chart.maxx);
this["origmaxy"] = new Number(chart.maxy);
this["newminx"] = new Number(newminx);
this["newminy"] = new Number(newminy);
this["newmaxx"] = new Number(newmaxx);
this["newmaxy"] = new Number(newmaxy);
this.animateProgress = 0;
this.animate("animateProgress", 1, duration, false);
}
else
{
/*
chart.minx = newminx;
chart.miny = newminy;
chart.maxx = newmaxx;
chart.maxx = newmaxy;
*/
this.chart.setAttribute("minx", newminx);
this.chart.setAttribute("miny", newminy);
this.chart.setAttribute("maxx", newmaxx);
this.chart.setAttribute("maxy", newmaxy);
this.chart.render();
chart.onRenderStop.sendEvent();
}
]]>
var action = actionlist.pop();
if(action)
{
this.changeBound(action.minx, action.miny, action.maxx, action.maxy, duration, false);
}