Product Documentation: Dashboard Code

TextSpec.setColor(value)

Specifies the text color.

Parameter
 value
 a java.awt.Color object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var titlespec = new TitleSpec();
 var textspec = new TextSpec();
 textspec.setColor(java.awt.Color(0xff0000));
 titlespec.setLabel("X Title")
 titlespec.setTextSpec(textspec);
 graph.setXTitleSpec(titlespec);
 graph.addElement(elem);
demo
Read how InetSoft saves money and resources with deployment flexibility.

TextSpec.setFont(value)

Specifies the text font, as a string with the following form: 'FontFamily-FontStyle-FontSize'.

Parameter
 value
 a java.awt.Font object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var titlespec = new TitleSpec();
 var textspec = new TextSpec();
 textspec.setFont(java.awt.Font('Verdana',
 java.awt.Font.BOLD, 14));
 titlespec.setLabel("X Title")
 titlespec.setTextSpec(textspec);
 graph.setXTitleSpec(titlespec);
 graph.addElement(elem);

TextSpec.setFormat(format)

Specifies how date or numeric data should be represented in string format for display.

Parameters
 format
 a java.text.Format object
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State","Quantity"],["NJ",20000],["NY",30000]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var qscale = new LinearScale("Quantity");
 var aspec = new AxisSpec();
 var tspec = new TextSpec();
 tspec.setFormat(java.text.DecimalFormat("##,###.00"));
 aspec.setTextSpec(tspec);
 qscale.setAxisSpec(aspec);
 graph.setScale("Quantity", qscale);
 graph.addElement(elem);

TextSpec.setRotation(value)

Specifies the text rotation in degrees.

Parameters
 value
 a number of degrees
Example (Report or Viewsheet)
 importPackage(inetsoft.graph)
 importPackage(inetsoft.graph.data)
 importPackage(inetsoft.graph.element)
 importPackage(inetsoft.graph.aesthetic)
 importPackage(inetsoft.graph.scale)
 importPackage(inetsoft.graph.coord)
 importPackage(inetsoft.graph.guide.form)
 
 var arr = [["State","Quantity"],["NJ",20000],["NY",30000]];
 dataset = new DefaultDataSet(arr);
 graph = new EGraph();
 var elem = new IntervalElement("State", "Quantity");
 var qscale = new LinearScale("Quantity");
 var aspec = new AxisSpec();
 var tspec = new TextSpec();
 tspec.setRotation(45);
 aspec.setTextSpec(tspec);
 qscale.setAxisSpec(aspec);
 graph.setScale("Quantity", qscale);
 graph.addElement(elem);
Read the top 10 reasons for selecting InetSoft as your BI partner.

More Articles About Dashboards

Automated Data Collection and Integration - Overview: AI-powered reporting software can automate the process of data collection and integration from various sources such as databases, cloud services, APIs, and IoT devices. This automation eliminates manual data entry and ensures real-time data synchronization. Benefits: Efficiency: Reduces the time and effort required to gather data from multiple sources. Accuracy: Minimizes human errors in data entry, leading to more reliable reports. Real-time Updates: Ensures that reports are always based on the most current data, which is crucial for decision-making...

Case Win-loss Scorecard - In the legal industry, a win-loss scorecard is used to evaluate the outcomes of legal cases and assess the performance of legal teams and strategies. Tracking key performance indicators (KPIs) and metrics in a legal case win-loss scorecard helps law firms and legal departments understand the factors contributing to success or failure in litigation and identify opportunities for improvement. Some of the essential KPIs and metrics tracked in a legal case win-loss scorecard include...

Features of Self-service Business Intelligence - User-Friendly Data Visualization: Self-service BI tools often offer intuitive drag-and-drop interfaces that allow users to create interactive and visually appealing data visualizations, such as charts, graphs, dashboards, and infographics. This empowers non-technical users to quickly grasp complex data insights. Data Integration: These tools can connect to various data sources, including databases, spreadsheets, cloud services, and more. This integration allows users to pull data from different sources into a centralized platform for analysis...

InetSoft's Health Informatics Software - In healthcare there is an immense amount of data to manage and keep track of. Not only do you need to monitor patients medical histories but there is a large and ever increasing demand for appointments which leads to scheduling and employee data metrics. Healthcare IT also encompasses many other critical facets including security measures in electronic health records. This is why the health informatics profession is vital for maintaining a viable healthcare system...

Skills of a Good Report Designer - A good report designer plays a crucial role in creating informative, visually appealing, and actionable reports. Here are several essential features that a proficient report designer should possess: Data Proficiency: A good report designer should have a strong understanding of the data being presented. This includes knowledge of data structures, relationships, and how to manipulate data for meaningful insights. Visualization Skills: Proficiency in choosing appropriate charts, graphs, and visual elements to represent data effectively. This includes an understanding of the best practices in data visualization, such as avoiding misleading scales and using color schemes that are easy to interpret...

Style Intelligence's Interactive Business Report Features - In Style Intelligence, interactive business reports are created with a drag and drop function that lets users pull out various chart and graph options and data fields, placing them on a spreadsheet-like interface. This drag and drop interface is optimal for the fast and seamless development of any interactive reports or visual analytics; no coding is necessary on the end-user's part...

Ten Use Cases of Big Data in Biotechnology - Now you know the key concepts, but it's just the tip of the iceberg. At this point, it is necessary to pinpoint the most important use cases of big data in biotechnology. Here are the top 10 examples: 1. Genomics We open the list with the obvious choice because genomics is the brand ambassador of big data in biotechnology. Genomics is the science of human genes, so it's obvious why big data is needed here. Genome sequencing is getting faster every day, but it still takes years to uncover the entire genome...

Previous: Drawing Graph