ChartLine™ May 2003

 

Editor's Welcome

This is the 2 April 2003 issue of ChartLine, the information service from
Visual Mining designed to share knowledge, help you get things done
faster, get through tough spots, and keep you up to date on what's
happening here.

We will continue to publish one of these every so often, and hope you'll
find them useful. Feel free to tell us what you need to know and we'll
try to cover it for you. ChartLine is archived on the Visual Mining web
site in case you need to refer to a particular resource.

Sincerely,
Nan Fredman, Editor, &
The Visual Mining Team


Manipulating the Data Cache in NetCharts® Server

In your NetCharts Server applications, you can allow the user to manipulate dynamic data and re-display the results as they view the application. You might want to let them visually edit graph data, or let them filter data on the fly via an HTML form.

How? Use the NetCharts Server runtime data cache as a temporary workspace instead of interacting with the original database. The three main benefits of doing this are:

  1. the greater speed with which the cache operates, in contrast to database manipulations;
  2. the application doesn't write to the database, so it preserves the
    original data securely; and
  3. this adds yet another dimension to interactivity.
  • Developers with remote application servers can remotely store data into the cache by passing in XML data, JDBC Result Sets, or Object arrays.
  • Cached data can be filtered, sorted, transposed, aggregated, and
    auto-formatted into chart parameters, in the exact same way as other Named Data Set (NDS) data can.
  • Developers can extract data from any source, perform business
    logic manipulation on the data and then store it into the cache for display.

Steps:

  1. Create the project in the Developers Console.
  2. Create the cache NDS data source, using the Data wizard, with a type of Cache, and some sample data.
  3. Create the raw NDS data source, using the Data wizard, from your SQL, Excel, or other source.
  4. Create the chart using the Chart Design wizard.
  5. Replace the chart parameters you want to manipulate in the CDL with a pointer to the NDS data cache, such as ColorTable = NDS "cachedata.ndx".
  6. Using the data from the "raw" NDS source, modify it according to your business logic, and save the data for use by the chart.

Example:

You can find a complete example of how to use the NetCharts Server data cache in the NetCharts Server Application Developers Guide, chapter 8. There are specific directions for step 6, above, for JSP, ASP, and Cold Fusion. The Guide is available as a printable PDF file on our web site.


Featured Chart: Combining a Graph and a Table

Though NetCharts Server allows you to create both graph and table visuals, other applications sometimes require a table and a graph to be combined into one chart image. This is especially true if you are using one of the other Visual Mining products. It also represents a time savings in associating a simple table with a graph.

 

This time chart uses multiple scales on a single axis and Notes. The Notes,
on the left-hand side, are anchored to their own left and bottom axes, and
the graph is using a separate axis set.

Additionally, the bars in the time graph on the right use transparency,
the darker bar showing the actual effort and the lighter bar showing the
planned effort. The text on the bar is part of the time chart element
(not a Note) and is used here to show the actual hours worked.

CDL:

ChartName = "Graph plus Table";
ChartType = TIMECHART;
ChartWidth = 800;
ChartHeight = 170;

Background = (white,NONE,3,null,TILE,black);
#ColorTable = x999966,x213321,xc3c3e6,x333366,xdace98,xaa0036,x291441;

#Header = ("Day Schedule",white,"SansSerif",12,0);
HeaderBox = (null,NONE,2,null,TILE,black);
HeaderActiveLabel = ("","","");

FooterActiveLabel = ("","","");

TopAxesGaps = 0;
TopAxesLayout = 40,60;

Grid = (silver_40,white,black,null,TILE),(silver_40,white,black,null,TILE);
GridAxis = (TOP1,LEFT),(TOP2,LEFT);

DataSets = ("",x51779C_80,NONE,1,null,TILE,black),("",x82CBD9_80,RAISED,2,null,TILE,black), ("",x1A2A67_80,RAISED,2,null,TILE,black),("",x485EB4_80,RAISED,2,null,TILE,black);
DataAxis = (TOP2,LEFT),(TOP2,LEFT),(TOP2,LEFT),(TOP2,LEFT);
DataSet1 =
("01-DEC-2002 08:00:00","16-DEC-2002 08:00:00",null,"216 hrs",black,"Helvetica",10,0),
("01-DEC-2002 08:00:00","09-DEC-2002 08:00:00",null,"",white,"Helvetica",10,0);

DataSet2 =
("04-DEC-2002 08:00:00","23-DEC-2002 08:00:00",null,"256 hrs",black,"Helvetica",10,0),
("04-DEC-2002 08:00:00","20-DEC-2002 08:00:00",null,"",white,"Helvetica",10,0);

DataSet3 =
("03-DEC-2002 08:00:00","28-DEC-2002 08:00:00",null,"216 hrs",black,"Helvetica",10,0),
("03-DEC-2002 08:00:00","12-DEC-2002 08:00:00",null,"",white,"Helvetica",10,0);

DataSet4 =
("08-DEC-2002 08:00:00","18-DEC-2002 08:00:00",null,"60 hrs",black,"Helvetica",10,0),
("08-DEC-2002 08:00:00","13-DEC-2002 08:00:00",null,"",white,"Helvetica",10,0);

DwellLabel = ("",black,"Arial",8,0);
DwellLabelBox = (white,BOX,1,null,TILE,black);

TopTics = ("ON",black,"Helvetica",9,0,null);
TopScale = (0,8,1);
TopScroll = (null,null);
TopTicLocations = 1,3,5;
TopLabels = "SITE","PROJECT","TASK";
TopAxisTitle = ("< Previous Month (November)",silver,"Helvetica",12,0);
TopAxisTitleBox = (null,NONE,1,null,TILE,black);
TopColor = null;
TopTicLayout = (NORMAL,0,1);

TopFormat2 = (DATE,"%d","01-DEC-2002 08:00:00","1d");
TopTics2 = ("ON",gray,"Helvetica",9,0,null);
TopScale2 = ("01-DEC-2002 08:00:00","31-DEC-2002 08:00:00","1d");

TopScroll2 = (null,null);
TopLabels2 = ;
TopAxisTitle2 = ("December 2002",silver,"Helvetica",16,0);
TopAxisTitleBox2 = (null,NONE,1,null,TILE,black);
TopColor2 = null;
TopTicLayout2 = (NORMAL,0,1);

LeftTics = ("ON",white,"SansSerif",10,null,null);
LeftTitleActiveLabel = ("","","");
LeftColor = white;
LeftScale = ("0","3","1");
LeftLabels = ;

RightTitleActiveLabel = ("","","");
RightTics = ("ON",white,"SansSerif",10,null,null);
RightTitle = (" ",white,"TimesRoman",16,0);
RightColor = white;

BottomTics = ("ON",white,"SansSerif",10,null,null);
BottomColor = white;

NoteBox = (,NONE,1,,TILE,),(,NONE,1,,TILE,),(,NONE,1,,TILE,),(,NONE,1,,TILE,);
NoteArrow = (SOLID,1,black,FROMTO,BLOCK,10,10),(SOLID,1,black,FROMTO,BLOCK,10,10), (SOLID,1,black,FROMTO,BLOCK,10,10),(SOLID,1,black,FROMTO,BLOCK,10,10);
NoteAxis = (TOP,LEFT),(TOP,LEFT),(TOP,LEFT),(TOP,LEFT);
NoteSets = (,CENTER),(,CENTER),(,CENTER),(,CENTER);
NoteLabel = (,black,"Arial",9,0),(,black,"Arial",9,0),(,black,"Arial",9,0),(,black,"Arial",9,0);
NoteSet1 = ("Fallon",1,0,,),("TRG1",3,0,,),("1.1.4",5,0,,);
NoteSet2 = ("Jersey",1,1,,),("TRG1",3,1,,),("1.1.3",5,1,,);
NoteSet3 = ("Torrence",1,2,,),("TRG1",3,2,,),("1.1.2",5,2,,);
NoteSet4 = ("Ensenido",1,3,,),("TRG1",3,3,,),("1.1.3",5,3,,);

NoteActiveLabels1 = ("click for site info","http://www.visualmining.com",),("click for project info","http://www.visualmining.com",),("click for task info","http://www.visualmining.com",);
NoteActiveLabels2 = ("click for site info","http://www.visualmining.com",),("click for project info","http://www.visualmining.com",),("click for task info","http://www.visualmining.com",);
NoteActiveLabels3 = ("click for site info","http://www.visualmining.com",),("click for project info","http://www.visualmining.com",),("click for task info","http://www.visualmining.com",);
NoteActiveLabels4 = ("click for site info","http://www.visualmining.com",),("click for project info","http://www.visualmining.com",),("click for task info","http://www.visualmining.com",);

ActiveLabels1 = ("","",""),("","",""),("","","");


Charting Tip: Reversing the X-Axis in an X-Y Chart

Using the X-Y chart and a little CDL manipulation, you can reverse the
direction of the usual axis numbering, should that become necessary.
Here are a couple of options that you could use to show the axis in reverse.

1) You could multiply the X values of your data by -1. This would make
the ordering of your data go in reverse, and be shown on the negative
side of the X-Y chart. The bottom labels would then become -X though.
To work around that, you could use the BottomLabels CDL Parameter to
set the labels manually. If you wish to use a BottomScale, enter the
values as negative numbers (i.e. BottomScale = (-5, -1, 1);).

This might look like:

LineSet1 = (-3.00,4),(-4.00,3),(-4.00,2),(-4.00,1);
LineSet2 = (-4.76,4),(-4.06,3),(-3.25,2),(-4.12,1);
LineSet3 = (-4.00,4),(-4.75,3),(-4.75,2),(-4.50,1);
LineSet4 = (-3.00,4),(-2.00,3),(-2.00,2),(-3.00,1);
BottomScale = (-5,-1,1);
BottomLabels = "5", "4", "3", "2", "1";

2) Multiple all the X values by -1 as in the first option. Then map the
data to a top axis that is not shown. This would allow you to set the
scale of the axis being used to show the data individually from the
axis that shows the labels. Set the bottom labels manually using the
BottomLabels CDL parameter to set only the labels you wish to see.

This might look like:

LineSet1 = (-3.00,4),(-4.00,3),(-4.00,2),(-4.00,1);
LineSet2 = (-4.76,4),(-4.06,3),(-3.25,2),(-4.12,1);
LineSet3 = (-4.00,4),(-4.75,3),(-4.75,2),(-4.50,1);
LineSet4 = (-3.00,4),(-2.00,3),(-2.00,2),(-3.00,1);
TopTics = (OFF,,"sansserif",12,0);
# Change the top scale as needed without interfering with the labels.
TopScale = (-5,-1,1);
TopAxisTitle = (" ",black,sansserif,14,90);
LineAxis = (TOP,LEFT),(TOP,LEFT),(TOP,LEFT),(TOP,LEFT);
BottomLabels = "5", "4", "3", "2", "1";


NetCharts Server 4.0 Update 2 Now Available

Update 2 brings you even more useful features to help you work with data, create great visuals, and integrate NetCharts Serve more easily into your existing web structures.

Improved Chart Wizards
The number of chart features that can be configured via the Development
Console Chart Wizards has been increased. Chart components such as the
Grid, Axis Font Size, Default Chart Font and Chart Background Style can
now be configured from within the Chart Wizard.

Improved Date Handling
NetCharts Server now supports multiple configurable date formats. This
allows users to more easily import date values from various data sources,
regardless of how each data source might represent and deliver dates.
This feature is controlled via a new chart engine runtime property.

JSP Tag Library
NetCharts Server now offers a custom JSP Tag Library to assist JSP developers in integrating NetCharts Server resources into JSP Pages, providing JSP authors with a set of JSP tags that can be used to interact with a NetCharts Server. This new tag library virtually eliminates the need for JSP authors to know Java in order to interact with the server to integrate charts or tables within their web applications. The tag library includes a data mapping facility that automatically maps rows and columns from a query result set into chart data sets.

Charting Engine Runtime Properties
NetCharts Server now allows Server Administrators to modify the default
runtime properties used by the underlying chart rendering engines. This
ability allows certain features of the rendering engines to be configured
at runtime. The runtime properties are configured on the General Server
Configuration Panel of the Administrator's Console. See that panel for a
list of currently supported runtime properties.

Project Archiving
NetCharts Server Administrators can now archive and restore projects using the new Project Archiving feature. Administrators can now archive an entire project for backup purposes. Archived projects can be restored using the same feature. Archived projects can also be transported and uploaded into other NetCharts Server installations. This feature makes it easier to deploy NetCharts Server projects from a development server to a production level system.

Redirectors Update
The NetCharts Server IIS Redirector, Java Redirector and Apache Redirector Module have been updated to allow multi-pass operations. This gives the redirectors the ability to retrieve interactive charts and JSP pages from NetCharts Server. Any image paths or Active Label links that refer to NetCharts Server resources will be modified to point back to the redirector, allowing them to be retrieved from NetCharts Server. To see an interactive chart when calling a CDX chart template through the redirector, append the drilldown=true parameter to the set of query string parameters.

To update to or evaluate this new version, please go to our website.

When integrating NetCharts Server directly into your web pages using URL's and not via a toolkit, if you find that your web applications or browsers are having problems with special ASCII characters, such as spaces, backslashes, forward slashes, apostrophes, and such, try URL encoding them. URL encoding is a simple method of encoding which converts spaces and other characters which may confuse the program reading the data. Simply substitute the code for the offending character.

For example, if you find that your Netscape browser is having trouble rendering our charts with titles, legends, or other text containing ampersands or spaces, you can replace the spaces with %20 and the ampersands with %26.

When passing a label through an ASP call, the problem with non-alphanumeric characters again crops up. If you were to try passing in dates with slashes in them, such as 05/02/2003, the date would not be interpreted correctly. This is another place to use URL encoding.

Here are some URL codes for special characters:

Space %20
Double quote (") %22
Dollar ("$") %24
Ampersand ("&") %26
Plus ("+") %2B
Comma (",") %2C
Forward slash/Virgule ("/") %2F
Colon (":") %3A
Semi-colon (";") %3B
Equals ("=") %3D
Question mark ("?") %3F
'At' symbol ("@") %40
'Less Than' symbol ("<") %3C
'Greater Than' symbol (">") %3E
'Pound' character ("#") %23
Percent character ("%") %25
Left Curly Brace ("{") %7B
Right Curly Brace ("}") %7D
Vertical Bar/Pipe ("|") %7C
Backslash ("\") %5C
Caret ("^") %5E
Tilde ("~") %7E
Left Square Bracket ("[") %5B
Right Square Bracket ("]") %5D
Grave Accent ("`") %60

NOTE - the NetCharts Server Toolkits take care of this problem for you!

You should not URL-encode any parameter values sent through the NetCharts Server Toolkits. Only parameters sent through a URL to NetCharts Server need to be URL Encoded - and this isn't our recommended method of using NetCharts Server.

NetCharts Server also provides the ability to display fonts from non-Latin
languages in graphs and popup labels. This feature utilizes the widely
recognized Unicode code pages in order to support many languages. Multiple languages and fonts can be simultaneously supported within each chart.

This feature is discussed in detail in Chapter 12 of the NetCharts Server Application Developers Guide.


Happy Charting!


Visual Mining's
News & Tips Letter
MAY 2003

IN THIS ISSUE:

  1. Manipulating the Data Cache in NetCharts Server
  2. Featured Chart: Combining a Table and Graph in a Chart
  3. Charting Tip: Reversing the X-Axis in an X-Y Chart
  4. NetCharts Server Update 2 Now Available

You are receiving this
e-newletter because you subscribed to ChartLine on our website, downloaded one of Visual Mining's products, or are a customer.

Send comments and questions to chartline@visualmining.com

NetCharts and Visual Mining are registered trademarks of Visual Mining, Inc. All other product and company names mentioned are the property of their respective owners and are mentioned for identification purposes only.

ChartLine Copyright © 2003
Visual Mining, Inc. All rights reserved.

Visual Mining, Inc.
15825 Shady Grove Rd, #20
Rockville, MD 20850
301.795.2200
www.visualmining.com
info@visualmining.com



NetCharts and Visual Mining are registered trademarks of Visual Mining, Inc.  All other product and company names mentioned are the property of their respective owners and are mentioned for identification purposes only.

ChartLine © 2003 Visual Mining, Inc.  All rights reserved.