---
title: Graphical Statbeans
description: The GraphicalStatbean class is the base class for all graphical Statbeans.
---

[![Statgraphics 19 logo](https://www.statgraphics.com/hs-fs/hubfs/stat19plain-01-1.png?width=2272&height=484&name=stat19plain-01-1.png "Statgraphics 19 logo")](https://www.statgraphics.com)

- [Products](https://www.statgraphics.com/product)
- [Learn](https://www.statgraphics.com/statistics-library)
- [Training](https://www.statgraphics.com/training-and-consulting)

- [Product](https://www.statgraphics.com/product) 
    - [Centurion XVIII](https://www.statgraphics.com/centurion-xvii)
    - [Sigma Express](https://www.statgraphics.com/statgraphics-sigma-express)
    - [Online](https://www.statgraphics.com/statgraphics-stratus)
    - [Web Services](https://www.statgraphics.com/statgraphics-web-services)
- [Learn](https://www.statgraphics.com/statistics-library) 
    - [Statistics Library](https://www.statgraphics.com/statistics-library)
    - [Six Sigma & Lean](https://www.statgraphics.com/six-sigma-lean)
    - [Instructional Videos](https://www.statgraphics.com/instructional-videos)
    - [Applications/ Case Studies](https://www.statgraphics.com/application)
- [Training & Consulting](https://www.statgraphics.com/training-and-consulting) 
    - [Statpoint Seminars](https://www.statgraphics.com/statpoint-seminar)
    - [Statpoint Instructors](https://www.statgraphics.com/statpoint-instructor)
    - [Training Partners](https://www.statgraphics.com/training-partners)
    - [Webinars](https://www.statgraphics.com/webinars)
- [Support](https://www.statgraphics.com/customer-support-overview)
- [Blog](https://www.statgraphics.com/blog)
- [Store](http://store.statgraphics.com)

### Statgraphics

## [Centurion](https://www.statgraphics.com/centurion-overview)

#### [LEARN MORE](https://www.statgraphics.com/centurion-overview)

### Statgraphics

## [Sigma *express*](https://www.statgraphics.com/statgraphics-sigma-express)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-sigma-express)

### Statgraphics

## [*Stratus*](https://www.statgraphics.com/statgraphics-stratus)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-stratus)

### Statgraphics

## [Web Services](https://www.statgraphics.com/statgraphics-web-services)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-web-services)

## [Statistics Library](https://www.statgraphics.com/statistics-library)

#### [LEARN MORE](https://www.statgraphics.com/statistics-library)

## [Six Sigma & Lean](https://www.statgraphics.com/six-sigma-lean)

#### [LEARN MORE](https://www.statgraphics.com/six-sigma-lean)

## [Instructional Videos](https://www.statgraphics.com/instructional-videos)

#### [LEARN MORE](https://www.statgraphics.com/instructional-videos)

## [Applications/ Case Studies](https://www.statgraphics.com/statistical-applications)

#### [LEARN MORE](https://www.statgraphics.com/statistical-applications)

## [Statgraphics Seminars](https://www.statgraphics.com/statpoint-seminar)

#### [LEARN MORE](https://www.statgraphics.com/statpoint-seminar)

## [Statgraphics Instructors](https://www.statgraphics.com/statpoint-instructor)

#### [LEARN MORE](https://www.statgraphics.com/statpoint-instructor)

## [Training Partners](https://www.statgraphics.com/public-seminar)

#### [LEARN MORE](https://www.statgraphics.com/public-seminar)

## [Webinars](https://www.statgraphics.com/webinars)

#### [LEARN MORE](https://www.statgraphics.com/webinars)

#### Statbeans

- [STATBEANS® Overview](https://www.statgraphics.com/statbeans)
- [DataSource STATBEANS®](https://www.statgraphics.com/statbeans_datasource)
- [Calculation STATBEANS®](https://www.statgraphics.com/statbeans_calculations)
- [Tabular STATBEANS®](https://www.statgraphics.com/statbeans_tabular)
- [Graphical STATBEANS®](https://www.statgraphics.com/statbeans_graphical)

[Back to Product Overviews](https://www.statgraphics.com/product)

# GraphicalStatbean

**Purpose:** Base class for all other graphical Statbeans. This bean is not intended to be used directly, but provides general properties for all graphical Statbeans.

**Read/Write Properties**

| **Name** | **Type** | **Description** | **Possible Values** | **Default Value** |
| --- | --- | --- | --- | --- |
| allBlackAndWhite | boolean | Whether to draw graphics in only black and white. | true,false | false |
| axisColor | Color | The color of the axes. | Any valid Color. | Color.blue |
| bottomMargin | int | The bottom margin as a percentage of the height of the canvas. | 0-50 | 25 |
| Border | boolean | Whether a border is drawn around the StatBean's canvas. | true,false | true |
| crosshairsColor | Color | Color used to draw crosshairs. | Any Color. | Color.darkGray |
| showCrosshairsMessage | boolean | Whether to display crosshair coordinates. | true,false | false |
| drawCrosshairsOnMouseDown | boolean | Whether to draw crosshairs when mouse is pressed. | true,false | false |
| fillColor | Color | The color of the first fill. | Any valid Color. | Color.blue |
| fillColors(int k) | Color | The color of fill set k. | Any valid Color. | Varied. |
| fullFrame | boolean | Whether the X-Y axes have four sides rather than two. | true,false | true |
| gridColor | Color | The color of the grid. | Any valid Color. | Color.lightGray |
| gridDirection | String | The type of grid to be added to the plot. | "None", "Horizontal", "Vertical", "Bidirectional" | "Bidirectional" |
| highlightColor | Color | Color used to highlight point. | Any Color. | Color.red |
| highlightPointOnMouseClick | boolean | Whether to highlight point if clicked on by mouse. | true,false | false |
| interiorColor | Color | The color of the area inside the axes. | Any valid Color. | Color.yellow |
| leftMargin | int | The left margin as a percentage of the width of the canvas. | 0-50 | 25 |
| legendColor | Color | Color used for legend. | Any Color. | Color.red |
| legendFont | Font | The font used for the legend. | Any Font. | "Serif",0,10 |
| legendHorizontalLocation | double | Location of the legend in (0,1) axis coordinates. | Any double. | 1.05 |
| legendText | String | The legend text, delimited by \\n. | Any string, or "@" to generate a default legend. | "@" |
| legendTitle | String | The title displayed above th legends. | Any string, or "@" to generate a default title. | "@" |
| legendVerticalLocation | double | Location of the legend in (0,1) axis coordinates. | Any double. | 0.90 |
| lineColor | Color | The color of the line connecting the points. | Any valid Color. | Color.black |
| lineColors(int k) | Color | The color of line set k. | Any valid Color. | Varied. |
| messageColor | Color | Color used for message. | Any Color. | Color.red |
| messageFont | Font | The font used for the message. | Any Font. | "Serif",0,10 |
| messageHorizontalLocation | double | Location of the message in (0,1) axis coordinates. | Any double. | 1.05 |
| messageVerticalLocation | double | Location of the message in (0,1) axis coordinates. | Any double. | 0.30 |
| paintInterior | boolean | Whether the area inside the axes should be painted. | true,false | true |
| pointColor | Color | The color of the point symbols. | Any valid Color. | Color.black |
| pointColors(int k) | Color | The color of point set k. | Any valid Color. | Varied. |
| pointSize | int | The size of the point symbols. | 0-20 | 2 |
| pointSizes(int k) | int | The size of point set k. | 0-20 | 2 |
| pointType | String | The type to be used for the point symbols. | "Rectangle","+", "X","Asterisk", "Diamond", "Inverted Triangle", "Triangle", "Circle","Filled Rectangle", "Filled Circle" | "Rectangle" |
| rightaxisBy | double | The distance between ticmarks on the right axis. | Any double > 0. | 0.2 |
| rightaxisFrom | double | The minimum value for the right axis. | Any double. | 0.0 |
| rightaxisLogscale | boolean | Whether axis is drawn as log base 10. | true,false | false |
| rightaxisPower | boolean | Whether small and large numbers are shown with a power. | true,false | true |
| rightaxisTicmarkColor | Color | The color to be used for the right axis ticmarks. | Any Color. | Color.black |
| rightaxisTicmarkFont | Font | The font to be used for the right axis ticmarks. | Any Font. | "Serif",0,12 |
| rightaxisTitle | String | The title displayed along the right axis. | Any string, or "@" to generate a default title. | "@" |
| rightaxisTitleColor | Color | The color to be used for the z axis title. | Any Color. | Color.black |
| rightaxisTitleFont | Font | The font to be used for the right axis title. | Any Font. | "Serif",0,12 |
| rightaxisTo | double | The maximum value for the right axis. | Any double > zaxisFrom. | 1.0 |
| rightaxisType | String | The type of data on the axis. | "Numeric","Character", "Integer","Date","Month", "Quarter","Time","Seconds", "0 Decimals","1 Decimal", "2 Decimals","3 Decimals", "4 Decimals","5 Decimals", "6 Decimals","7 Decimals", "8 Decimals","9 Decimals" | "Numeric" |
| rightMargin | int | The right margin as a percentage of the width of the canvas. | 0-50 | 20 |
| showPointClickedMessage | boolean | Whether to display point coordinates. | true,false | false |
| significantDigits | int | The number of signigicant digits to be displayed. | 2-20 | 6 |
| ticmarkGap | int | Gap between the axes and the origin as a percentage of the width of the axes. | 0-10 | 4 |
| ticmarkOrientation | String | The direction of the ticmarks relative to the axes. | "In","Out","None" | "in" |
| ticmarkLength | int | Length of the ticmarks as a percentage of the width of the axes. | 0-10 | 2 |
| topMargin | int | The top margin as a percentage of the height of the canvas. | 0-50 | 20 |
| topTitleLine1 | String | The first line of the title displayed above the graph. | Any string, or "@" to generate a default title. | "@" |
| topTitleLine1Color | Color | The color to be used for the first line of the top title. | Any Color. | Color.black |
| topTitleLine1Font | Font | The font to be used for the first line of the top title. | Any Font. | "Serif",0,16 |
| topTitleLine2 | String | The second line of the title displayed above the graph. | Any string, or "@" to generate a default title. | "@" |
| topTitleLine2Color | Color | The color to be used for the second line of the top title. | Any Color. | Color.black |
| topTitleLine2Font | Font | The font to be used for the second line of the top title. | Any Font. | "Serif",0,12 |
| useDefaultFonts | boolean | Whether default fonts should be used. | true,false | true |
| useDefaultScaling | boolean | Whether default scaling should be used. | true,false | true |
| xaxisBy | double | The distance between ticmarks on the x axis. | Any double > 0. | 0.2 |
| xaxisFrom | double | The minimum value for the x axis. | Any double. | 0.0 |
| xaxisLogscale | boolean | Whether axis is drawn as log base 10. | true,false | false |
| xaxisPower | boolean | Whether small and large numbers are shown with a power. | true,false | true |
| xaxisTicmarkColor | Color | The color to be used for the x axis ticmarks. | Any Color. | Color.black |
| xaxisTicmarkFont | Font | The font to be used for the x axis ticmarks. | Any Font. | "Serif",0,12 |
| xaxisTitle | String | The title displayed along the x axis. | Any string, or "@" to generate a default title. | "@" |
| xaxisTitleColor | Color | The color to be used for the x axis title. | Any Color. | Color.black |
| xaxisTitleFont | Font | The font to be used for the x axis title. | Any Font. | "Serif",0,12 |
| xaxisTo | double | The maximum value for the x axis. | Any double > xaxisFrom. | 1.0 |
| xaxisType | String | The type of data on the axis. | "Numeric","Character", "Integer","Date","Month", "Quarter","Time","Seconds", "0 Decimals","1 Decimal", "2 Decimals","3 Decimals", "4 Decimals","5 Decimals", "6 Decimals","7 Decimals", "8 Decimals","9 Decimals" | "Numeric" |
| yaxisBy | double | The distance between ticmarks on the y axis. | Any double > 0. | 0.2 |
| yaxisFrom | double | The minimum value for the y axis. | Any double. | 0.0 |
| yaxisLogscale | boolean | Whether axis is drawn as log base 10. | true,false | false |
| yaxisPower | boolean | Whether small and large numbers are shown with a power. | true,false | true |
| yaxisTicmarkColor | Color | The color to be used for the y axis ticmarks. | Any Color. | Color.black |
| yaxisTicmarkFont | Font | The font to be used for the y axis ticmarks. | Any Font. | "Serif",0,12 |
| yaxisTitle | String | The title displayed along the y axis. | Any string, or "@" to generate a default title. | "@" |
| yaxisTitleColor | Color | The color to be used for the y axis title. | Any Color. | Color.black |
| yaxisTitleFont | Font | The font to be used for the y axis title. | Any Font. | "Serif",0,12 |
| yaxisTo | double | The maximum value for the y axis. | Any double > yaxisFrom. | 1.0 |
| yaxisType | String | The type of data on the axis. | "Numeric","Character", "Integer","Date","Month", "Quarter","Time","Seconds", "0 Decimals","1 Decimal", "2 Decimals","3 Decimals", "4 Decimals","5 Decimals", "6 Decimals","7 Decimals", "8 Decimals","9 Decimals" | "Numeric" |
| zaxisBy | double | The distance between ticmarks on the z axis. | Any double > 0. | 0.2 |
| zaxisFrom | double | The minimum value for the z axis. | Any double. | 0.0 |
| zaxisLogscale | boolean | Whether axis is drawn as log base 10. | true,false | false |
| zaxisPower | boolean | Whether small and large numbers are shown with a power. | true,false | true |
| zaxisTicmarkColor | Color | The color to be used for the z axis ticmarks. | Any Color. | Color.black |
| zaxisTicmarkFont | Font | The font to be used for the z axis ticmarks. | Any Font. | "Serif",0,12 |
| zaxisTitle | String | The title displayed along the z axis. | Any string, or "@" to generate a default title. | "@" |
| zaxisTitleColor | Color | The color to be used for the z axis title. | Any Color. | Color.black |
| zaxisTitleFont | Font | The font to be used for the z axis title. | Any Font. | "Serif",0,12 |
| zaxisTo | double | The maximum value for the z axis. | Any double > zaxisFrom. | 1.0 |
| zaxisType | String | The type of data on the axis. | "Numeric","Character", "Integer","Date","Month", "Quarter","Time","Seconds", "0 Decimals","1 Decimal", "2 Decimals","3 Decimals", "4 Decimals","5 Decimals", "6 Decimals","7 Decimals", "8 Decimals","9 Decimals" | "Numeric" |

**Other Public Methods**

| **Name** | **Description** | **Arguments** | **Return Value** |
| --- | --- | --- | --- |
| void getLastCursorPosition(double xy\[2\]) | Returns the coordinates of the last mouse press. | Mouse XY coordinates. | None. |
| int getLastPointClicked(double xyz\[3\]) | Returns the row number and coordinates of the last highlighted point. | Point XY or XYZ coordinates. | Row number (0 origin). |
| boolean hasFills() | Returns true if graph contains filled areas. | None. | True or false. |
| boolean hasGrid() | Returns true if graph contains a grid. | None. | True or false. |
| boolean hasLegends() | Returns true if graph contains legends. | None. | True or false. |
| boolean hasLegendTitle() | Returns true if graph contains a legend title. | None. | True or false. |
| boolean hasLines() | Returns true if graph contains lines. | None. | True or false. |
| boolean hasPoints() | Returns true if graph contains points. | None. | True or false. |
| boolean hasRightaxis() | Returns true if graph contains right-axis ticmarks. | None. | True or false. |
| boolean hasRightaxisTitle() | Returns true if graph contains a right-axis title. | None. | True or false. |
| boolean hasTopTitleLine1() | Returns true if graph contains a top title. | None. | True or false. |
| boolean hasTopTitleLine2() | Returns true if graph contains a 2-line top title. | None. | True or false. |
| boolean hasXaxis() | Returns true if graph contains x-axis ticmarks. | None. | True or false. |
| boolean hasXaxisTitle() | Returns true if graph contains an x-axis title. | None. | True or false. |
| boolean hasYaxis() | Returns true if graph contains y-axis ticmarks. | None. | True or false. |
| boolean hasYaxisTitle() | Returns true if graph contains a y-axis title. | None. | True or false. |
| boolean hasZaxis() | Returns true if graph contains z-axis ticmarks. | None. | True or false. |
| boolean hasZaxisTitle() | Returns true if graph contains a z-axis title. | None. | True or false. |
| boolean isThreed() | Returns true if graph is 3-dimensional. | None. | True or false. |
| void setErrorMessage(String S) | Sets a message to be displayed instead of the defined graph. | Message string. | None. |
| void updateScalingFromGraph() | Sets from, to, and by members to current scaling. | None. | None. |

**Added January, 2019**

| **Name** | **Type** | **Description** | **Possible Values** | **Default Values** |
| --- | --- | --- | --- | --- |
| borderColor | Color | Sets fill color for area around the graph. | Any valid Color. | Color.white |
| paintBorder | boolean | Whether to fill area around graph with borderColor. | true,false | false |
| xaxisTicmarkAngle | double | Orientation angle of ticmarks on X-axis. | 0,90 | 0 |

| **Name** | **Description** | **Arguments** | **Return Value** |
| --- | --- | --- | --- |
| setRightAxisFrom(String from, char type) | Sets start value for right axis. | Leftmost ticmark value, and scaling type ('N', 'D', 'M', '"Q', 'T' or 'S') | None |
| setRightAxisTo(String to, char type) | Sets end value for right axis. | Rightmost ticmark value, and scaling type ('N', 'D', 'M', '"Q', 'T' or 'S') | None |
| setXAxisFrom(String from, char type) | Sets start value for X axis. | Leftmost ticmark value, and scaling type ('N', 'D', 'M', '"Q', 'T' or 'S') | None |
| setXAxisTo(String to, char type) | Sets end value for X axis. | Rightmost ticmark value, and scaling type ('N', 'D', 'M', '"Q', 'T' or 'S') | None |
| setYAxisFrom(String from, char type) | Sets start value for Y axis. | Leftmost ticmark value, and scaling type ('N', 'D', 'M', '"Q', 'T' or 'S') | None |
| setYAxisTo(String to, char type) | Sets end value for Y axis. | Rightmost ticmark value, and scaling type ('N', 'D', 'M', '"Q', 'T' or 'S') | None |
| setZAxisFrom(String from, char type) | Sets start value for Z axis. | Leftmost ticmark value, and scaling type ('N', 'D', 'M', '"Q', 'T' or 'S') | None |
| setZAxisTo(String to, char type) | Sets end value for Z axis. | Rightmost ticmark value, and scaling type ('N', 'D', 'M', '"Q', 'T' or 'S') | None |

** Code Sample**

//set filename  
 fileDataSource1.setFileName("c:\\\\statbeans2\\\\samples\\\\processdata.txt");

 //read variable names from first row  
 fileDataSource1.setFindNames(true);

 //select basic chart type  
 controlCharts1.setChartType("X-bar and R");

//specify variable containing data  
 controlCharts1.setXVariableName("Strength");

 //specify variable defining subgroups  
controlCharts1.setSubgroupSizeVariableName("Date");

 //specify variable used to label x axis  
controlCharts1.setIdentifierVariableName("Date");

 //paint border light blue  
 controlChartsPlot1.setPaintBorder(true);  
 Color blue=new Color(135,206,250);  
 controlChartsPlot1.setBorderColor(blue);

//define size of chart  
 controlChartsPlot1.setBounds(16,16,550,350);

//set type of data  
 controlChartsPlot1.setXtype('D');

 //set X-axis titles  
 controlChartsPlot1.setXaxisTitle("Date");

 //set top title  
 //controlChartsPlot1.setTopTitleLine1("X-bar Chart");

 //turn xaxis tickmarks vertical  
 controlChartsPlot1.setXaxisTicmarkAngle(90.0);

 //reduce size of points  
 controlChartsPlot1.setPointSize(1);

 //define xaxis scaling using dates  
 controlChartsPlot1.setUseDefaultXaxisScaling(false);  
 controlChartsPlot1.setXaxisFrom("1/1/2019",'D');  
 controlChartsPlot1.setXaxisTo("1/21/2019",'D');  
 controlChartsPlot1.setXaxisBy(5);

//add graph to display pane  
 getContentPane().add(controlChartsPlot1);

 //define listeners  
 fileDataSource1.addDataChangeListener(controlCharts1.listenerForDataChange);  
 controlCharts1.addDataChangeListener(controlChartsPlot1.listenerForDataChange);

 //read data and notify all listeners  
 fileDataSource1.readData();  
 fileDataSource1.updateListeners();

[![contact-icon](https://www.statgraphics.com/hs-fs/hubfs/stat19web/sales.png?width=50&name=sales.png "contact-icon.fw")](https://www.statgraphics.com/contact-us-dealers-global-partners)

### [CONTACT SALES](https://www.statgraphics.com/contact-us-dealers-global-partners)

Contact our Sales team today

[![youtube-icon.fw](https://www.statgraphics.com/hubfs/stat19web/watchr.png)](https://www.statgraphics.com/instructional-videos)

### [WATCH A VIDEO](https://www.statgraphics.com/instructional-videos)

Learn more about the many enhancements added to Version 19

[![download](https://www.statgraphics.com/hubfs/stat19web/downloadr.png)](https://www.statgraphics.com/download18)

### [DOWNLOAD TRIAL](https://www.statgraphics.com/download19)

Try Statgraphics 19 today for free!

[![eye icon](https://www.statgraphics.com/hubfs/stat19web/viewr.png)](https://www.statgraphics.com/download-brochure-0)

### [VIEW BROCHURE](https://www.statgraphics.com/download-brochure-0)

Discover Statgraphics 19 with our product brochure.

![contact us](https://www.statgraphics.com/hubfs/stat19web/contactr.png)

© 2025 Statgraphics Technologies, Inc.

The Plains, Virginia

[CONTACT US](https://www.statgraphics.com/contact-us-partner)

![Statgraphics download center](https://www.statgraphics.com/hs-fs/hubfs/stat19web/downloadcr.png?width=50&name=downloadcr.png)

Have you purchased Statgraphics Centurion or Sigma Express and need to download your copy?

[CLICK HERE](https://www.statgraphics.com/download-center)

- [Support](https://www.statgraphics.com/customer-support-overview)
- [Company](https://www.statgraphics.com/contact-us-dealers-global-partners)
- [Blog](https://blog.statgraphics.com)

-  
-          

-  