ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Graph additions for next release
Posted by Greg White on Dec-17-2010 00:08
I would like to see chart director support these types of graphs.

http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1&topic=

and

http://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf

thanks.

  Re: Graph additions for next release
Posted by Peter Kwan on Dec-17-2010 02:09
Hi Greg,

I have seen quite a number of our customers are already drawing similar charts with ChartDirector.

A sparkline is just a small line chart, with the plot area border just outside the chart image, so that the axis labels are not seen. There are features in ChartDirector to add the grey zones (Axis.addZone) and the red dot (just add a scatter layer using dots as symbols).

The "Bullet Graph" is a normal bar chart with one bar. You may add the background zones by using Axis.addZone, and the bullets by adding scatter layers.

Hope this can help.

Regards
Peter Kwan

  Re: Graph additions for next release
Posted by Daniel on Jan-31-2011 17:44
"A sparkline is just a small line chart, with the plot area border just outside the chart image, so that the axis labels are not see"

I would say that Edward Tufte made a MOST significant contribution to the art of data graphics with his enlightening definition of sparklines. I, for one, do not use them extensively but would be they are a definite step up in this area.

May I second the posting in the request of some sort of API support for "sparklines" in the future. IMHO they deserve specific support and are possibly more essential for quite a few of us than, say, industrial gauges and likes.

http://en.wikipedia.org/wiki/Sparkline

  Re: Graph additions for next release
Posted by Peter Kwan on Feb-01-2011 00:41
Hi Daniel,

With the current version of ChartDirector, a sparkline chart can be created in 4 lines of code, like (in Java):

XYChart c = new XYChart(200, 100);
c.setPlotArea(-1, -1, c.getWidth() + 2, c.getHeight() + 2, Chart.Transparent, -1, -1, Chart.Transparent);
c.addLineLayer(myData, 0x0000ff);
String chart1URL = c.makeSession(request, "chart1");

You can argue that with a special API for sparkline, the second line (setPlotArea) should not be needed. However, you still need 3 lines to set the chart size, to add the data, and to output the chart. It is hard to see how you can simplify it further.

So I am thinking, may be the current ChartDirector API is already very suitable for creating sparklines. What is needed is probably some sample code in the documentation.

Regards
Peter Kwan

  Re: Graph additions for next release
Posted by Alain on Mar-24-2021 00:08
This is quite an old message but is there an example for the Bullet Chart graph/Sparkline ? I understood that you planed to put an example in the documentation but I could not find one ?
Regards
Alain

  Re: Graph additions for next release
Posted by Peter Kwan on Mar-24-2021 23:18
Hi Alain,

Eventually, we have not included examples specifically for "Sparkline", as we think it is just a small line chart, and there are already a lot of sample code for line charts.

So basically, you can start from any line chart example, make it smaller in size, and remove unnecessary things (such as the chart title), and hide other things (such as the axis) by setting their colors to transparent. This leaves the only the line in the chart.

The code in my previous message is an example of a spark line.

For bullet chart, I think it can be considered as a horizontal bar meter or a horizontal bar chart. You just need to make it smaller in size and hide any unnecessary things by setting their colors to transparent. If you need some coloring of the background to represent data range, you can use Axis.addZone to add the colors.

If you need more specific examples, would you mind to inform me which programming language edition of ChartDirector you are using, and may be an image of the chart style you want to use?

Regards
Peter Kwan