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

Message ListMessage List     Post MessagePost Message

  Wishlist
Posted by Zev Toledano on Feb-21-2011 15:51
I have been working with ChartDirector for over 6 months now and I'm very pleased. Not everything is easy, but every requirement that comes up has a solution including some very tricky graphics. So kudos for the great work.

I have some non-critical leftovers though, and I was wondering whether there is a plan to implement any of these in the future. Some are quite obscure or complex in terms of design, but I figured I'd post them anyways. Do you have some kind of list of upcoming features anywhere?

- Am I correct in saying that Meter pointers don't support mouse clicks and tooltips? This is actually something we could really use to support drill-downs with gauges/meters. Same goes for surface/contour charts but this is less important.

- 3D rotation/angle/twist settings for 3D XYCharts. This is also something we could really use. Any target date for this?

- Easier APIs for selecting multiple points with a drag of the mouse perhaps by throwing an event with a list of the points within the selected area.

- Easier methods for highlighting points WITHOUT redrawing the graph every time. I.e. something like 'onmouseover/onclick, change the color of a specific point(s) to color xyz'.

- The ability to synchronize the surface/contour coloraxis with a different axis other than the zaxis.

- 'Surface charts with scatter points' with different colors per point/layer. I.e. a 3d scatter chart.

- Multiple legends in one graph - each showing a different set of keys. Currently I add a transparent chart per legend that I wish to add but this sometimes does funny things with a rounded legend frame/shadow...

- The ability to treat line layers as line segments with variable widths/colors per segment.

- And finally a big one, support for map charts by plotting against longitude/latitude and loading map images etc. I suppose this is a completely different product though? I was just wondering if you considered it and what your thoughts are on this.

  Re: Wishlist
Posted by Peter Kwan on Feb-22-2011 00:45
Hi Zev,

Thanks a lot of for your valuable suggestions. Below is our feedback.

(A) Am I correct in saying that Meter pointers don't support mouse clicks and tooltips? This is actually something we could really use to support drill-downs with gauges/meters. Same goes for surface/contour charts but this is less important.

Although ChartDirector supports multiple meter pointers per meter, in most applications, people will just use one pointer per meter. In this case, there is only one data point per meter. So instead of making part of the meter (eg. the pointer) clickable, you can allow the user to click on the entire meter and show tooltips for the entire meter.

You can easily make the entire meter clickable and show tooltips using standard HTML, just as you can make any image clickable and show tooltips using HTML. Because these features can be achieved using HTML easily, so we have not invented an API for these features.

For contour charts, you can make the data points clickable (just like in other XY charts). To do this, just add a transparent scatter layer using the data points. The scatter layer will provide the hot spots and tooltips for the data points.

For 3D surface charts, the situation is much more complicated because the display is in 3D, and the data points can be arbitrarily positioned. It is always ambiguous where the mouse is pointing to. So currently, we have not planned to support clickable data points for 3D surface charts.

(B) 3D rotation/angle/twist settings for 3D XYCharts. This is also something we could really use. Any target date for this?

Whereas 3D rotation for XYChart is in our development wish list, we do not currently have a target date or version when this will be available.

(C) Easier APIs for selecting multiple points with a drag of the mouse perhaps by throwing an event with a list of the points within the selected area.

Currently, you may use the "drag to zoom" feature to allow the user to drag a rectangle on the chart. ChartDirector can tell your code the selected range, but it cannot tell your code which data points are within the range. You would need to search your data to check if the points are within the range.

(D) Easier methods for highlighting points WITHOUT redrawing the graph every time. I.e. something like 'onmouseover/onclick, change the color of a specific point(s) to color xyz'.

You can highlight points without redrawing the chart. For example, you can put a rectangle or circle to enclose the selected points. The exact details depends on your GUI framework. For example, in HTML, a rectangle is simply an empty DIV block.

(Note: The rectangle or circle is not part of the chart, just like the mouse cursor is not part of the chart. They are separate objects put on top of the chart.)

(E) The ability to synchronize the surface/contour coloraxis with a different axis other than the zaxis.

This is an interesting idea. I will include this in our development wish list.

(F) 'Surface charts with scatter points' with different colors per point/layer. I.e. a 3d scatter chart.

3D scatter chart will be supported in the next version of ChartDirector, but it is not  a "surface charts with scatter points". You may plot a 3D surface chart or 3D scatter chart but not both simultaneously in the same chart.

(G) Multiple legends in one graph - each showing a different set of keys. Currently I add a transparent chart per legend that I wish to add but this sometimes does funny things with a rounded legend frame/shadow...

Would you mind to inform me what are the funny things with a rounded frame/shadow? Is it something related to the "exterior backgorund color" (the first parameter to BaseChart.setRoundedFrame), which is white by default.

(I) The ability to treat line layers as line segments with variable widths/colors per segment.

Some of our customers currently are doing this with multiple line layers, with each layer representing a segments of the same color.

(J) And finally a big one, support for map charts by plotting against longitude/latitude and loading map images etc. I suppose this is a completely different product though? I was just wondering if you considered it and what your thoughts are on this.

As you have mentioned, map drawing or geographic information system is a very specialized field. Currently, ChartDirector can only treat the maps as background images, and then overlay text, charts, scatter symbols or other things on the image.

ChartDirector is not aware on the "deepl structure" of the map image (such as the boundaries of the states or countries, sea and land, roads) or the geometerical properties of the map (such as the various projection methods to map the spherical world surface to a flat surface, etc).

Regards
Peter Kwan

  Re: Wishlist
Posted by Zev Toledano on Feb-22-2011 02:22
Attachments:
(A) I need to know which pointer he clicked on in order to perform the correct drill-down so this won't help me.

(C) The point is not to zoom but to perform some actions on multiple points. So I can't use zooming. I realize I can calculate which points fall within a rectangle, but my request is to make this easier if possible.

(D) Please expand on this - I did not understand. If I want a bar or scatter point to change color when the user hovers over it with his mouse, how would I do this with VB6?

(G) See attached. I have no idea why the rounded corners look like this. It doesn't happen when I add the same legend without adding a new transparent chart for it. I attached another one without the extra transparent chart for comparison.

(I) You mean I have to set 2 points per line layer so that it will only display that line segment? I would also have to setXData to make sure it appears in the right place....Yeah I suppose this can be done assuming I understood it correctly.
tmp.png
tmp2.png

  Re: Wishlist
Posted by Peter Kwan on Feb-23-2011 08:08
Attachments:
Hi Zev,

(A) Currently, it is easy to determine which meter is being clicked, but not so easy to determine which pointer within a meter is being clicked (in case there are multiple pointers in each meter). I remember one of our customers did this by generating the image map with his own code. I estimate it is around 10 lines of code. Some hints are at:

http://www.chartdir.com/forum/download_thread.php?bn=chartdir_general&thread=1150894146#N1151093548

(C) We can use the "zoom" user interface to allow the user to drag a selection rectangle. You do not have to actually zoom in. When a selection rectangle is dragged, a "ViewPortChanged" event will be fired, and you can determine the range being selected. In the event handler, you can cancel the zoom (by resetting the view port to its default values and not updating the chart). Then you would need to use your own code to find the points within the range.

(D) If you want to change anything on the chart, probably the chart needs to be redrawn. However, if you just want to "highlight" a point, you may not need to change anything on the chart at all, so you do not need to redraw the chart. You may, for example, use a "rectangle" enclose the point when the mouse is over the point.

The "rectangle" can be considered as similar to the mouse cursor, except that it appears only when the mouse is over a point, and it "snaps" to the point. Like the mouse cursor, the "rectangle" is not part of the chart. It just moves and stays on the chart.

In virtually all GUI systems (HTML, MFC, QT, .NET, Java, ...), the hollow rectangle can be created easily. But in VB6, it is not as easy (but still not difficult), because VB6 does not built-in support transparent foreground controls. (Anything control that has a truly transparent background in VB6 must stay at the back of the VB form - therefore it cannot be put on top of the chart.) In VB6, the method I can think of is to put 4 "line" controls on the form and hide it initially. When the rectangle is needed, you just move the 4 lines to create the rectangle. A "line" control can be created by using an empty PictureBox, set its size to 1 x 15 pixels for a vertical line (and 15 x 1 pixels for a horizontal line), and set its background color to black.

(G) The rounded corners seem to be "double drawn". In anti-alias graphics, if a line segment is drawn twice, the anti-alias effect will become incorrect. For your case, is it possible the rounded edges are drawn twice (eg. both the chart border and the legend box border are rounded, and they happened to be of the same size)?

I have attached an example I have created. It does not seem to have the effect in your case. The code I used is:


Set cd = CreateObject("ChartDirector.API")

' The data for the bar chart
data = Array(85, 156, 179.5, 211, 123)

' Create a XYChart object of size 250 x 250 pixels
Set c = cd.XYChart(450, 500)

' Set the plotarea at (30, 20) and of size 200 x 200 pixels
Call c.setPlotArea(30, 20, 200, 200)

' Add a bar chart layer using the given data
Call c.addBarLayer(data)

Set legendBox1 = cd.PieChart(150, 150, cd.Transparent)
Set b = legendBox1.addLegend(0, 0)
Call b.addKey("123", &Hff0000)
Call b.addKey("456", &H00ff00)
Call b.setRoundedCorners()

Call legendBox1.setRoundedFrame()
Call legendBox1.layoutLegend()
Call legendBox1.setSize(b.getWidth(), b.getHeight())

Call c.makeChart3().merge(legendBox1.makeChart3(), 250, 50, cd.TopLeft, 0)

(I) If there are not a lot of points (eg. less than 1000), you can use two points per layer. For example:

For i = 0 To Ubound(myDataY) - 1
    Call c.addLineLayer(Array(myDataY(i), myDataY(i + 1)), myColor(i)).setXData(Array(myXData(i), myXData(i + 1))
Next

One issue of the above method is there will be imperfect anti-alias effects at the line joins. So it is best if you also have data symbols on the points to cover the joins.

If you have many data points (approaching the number of pixels on the chart), and the line flows only horizontally from left to right, you may compute the color at each horizontal pixel, and use it to create a pattern color (see BaseChart.patternColor) to color the line.

Hope this can help.

Regards
Peter Kwan
simplebar.png

  Re: Wishlist
Posted by Zev Toledano on Feb-23-2011 18:11
Thanks for your commentary and help...

(A) Determining whether he clicked on a pointer is a more difficult than zones from what I understand, because I have to take into account varying pointer positions, lengths, widths and even shapes. This is not something I think I wish to spend time on. Am I to understand from your answer that there are no plans for the future in this area?

(C) Thanks for the suggested starting point. As I said, I was wondering if it would be made easier in the future that's all.

(D) This is not exactly what I wanted. Drawing boxes around points is not graphically elegant and there may also be issues with overlapping points/bars in which case the box will not make it clear what is being selected. All I want to know is if there are any plans for the future in this area.

(G) I apologize for wasting your time with this. You were 100% right: I was adding the transparent legend charts twice by mistake.

(I) Thanks. This seems doable.

  Re: Wishlist
Posted by Peter Kwan on Feb-24-2011 00:30
Hi Zev,

(A) Yes. There is a plan to implement image map for meter pointers in a future version of ChartDirector.

If this feature is required today, personally, I would just use a thin zone, or a rotated rectangle, to approximate a meter pointer for the purpose of distinguishing which pointer the mouse is over.

(C) Unluckily, currently there is no plan to provide an API to determine the data points that are inside a given data range.

(D) There is a future plan to allow the chart to be updated without recreating the entire chart object. (ChartDirector internally may still need to redraw the entire chart, but the developer may not be aware of it.)

Regards
Peter Kwan