|
ScatterLayer |
Posted by John on Jun-19-2013 14:13 |
|
Hi,
How can I make a ScatterLayer to pass through a specified point (1,0) each time without adding this point to the data list.
Thanks,
John |
Re: ScatterLayer |
Posted by Peter Kwan on Jun-19-2013 17:54 |
|
Hi John,
Do you mean you want the x-axis and y-axis to be auto-scaled by ChartDirector, yet it must contain the point (x = 1, y = 0), regardless of what are the actual data?
ChartDirector auto-scales the axes based on the data values. If you would like the axis scale to include the point (1, 0), the best way is to add the point to the chart. You can set the point to transparent so it would not be visible and so it should not affect your chart. For example, in C#/Java:
//an invisible point that does not have any image map
c.addScatterLayer(new double[] { 1 }, new double { 0 }, "", Chart.SquareSymbol, 1, Chart.Transparent, Chart.Transparent).setHTMLImageMap("{disable}");
Hope this can help.
Regards
Peter Kwan |
Re: ScatterLayer |
Posted by John on Jun-19-2013 18:29 |
|
Hi Peter Kwan,
Yes, I want the x-axis and y-axis to be auto-scaled by ChartDirector and it must contain the point (x = 1, y = 0), regardless the actual data.
And my Scatterlayer should pass through the point (x=1,y=0) every time but I should not get the symbol on the graph for that particular point (1,0).
The code snippet iam using is :
c->addScatterLayer(dataX0, dataY0,, chart.SquareSymbol, CORRN_8, 0x0000ff);
My scatterlayer line should pass through (1,0) but that point should not be highlighted in
chart.SquareSymbol like all other data points.
Thanks in advance,
John. |
Re: ScatterLayer |
Posted by Peter Kwan on Jun-19-2013 18:48 |
|
Hi John,
Have you tried the method I mentioned in my last message - adding another scatter layer with just one point at (1, 0) using the transparent color?
Regards
Peter Kwan |
Re: ScatterLayer |
Posted by John on Jun-19-2013 20:35 |
|
Hi Peter Kwan,
No, I want to add the point (x=1,y=0) to the same scatterlayer. I cant use another scatterlayer for this point.
Thanks,
John. |
Re: ScatterLayer |
Posted by Peter Kwan on Jun-19-2013 23:39 |
|
Hi John,
Would you mind to clarify why that invisible point must be added to the scatterlayer? I am thinking, since it is invisible and would not affect other data points, so whether it is in the same scatterlayer or in a different scatter layer should not matter. If I can know the reason, I may be able to think of an alternative solution.
Regards
Peter Kwan |
Re: ScatterLayer |
Posted by John on Jun-28-2013 20:53 |
|
Hi Peter Kwan,
I have two scatterlayers scatter1 and scatter2 with same datapoints in my code. I have added an imagemap to scatter1 and iam trying to move and redraw it again which iam able to achieve now. But my scatter2 is also moving along with scatter1 though I have not created any imagemap to scatter2.
How can I overcome this ?
Thanks,
John. |
Re: ScatterLayer |
Posted by Peter Kwan on Jun-29-2013 04:59 |
|
Hi John,
Sorry. I am unable to understand the issue. Would you mind to clarify?
You mentioned there are two scatterlayers. Are the two layers on the same chart (same XYChart object), or are they two different charts?
You mentioned both scatterlayers are using the "same data points". So they should look the same, as they are using the same data. You mentioned you move and redraw sactter1. Would you mind to clarify how do you "move and redraw"? By "moving", do you mean you change the data for scatter1? If you change the data for scatter1, are scatter1 and scatter2 still using the "same data points"? If they are using the "same data points", then modify the data will affect both charts.
The image map should not cause or prevent the chart to be moved, so whether there is an image map not should not matter.
I think I probably do not understand what you mean. Please kindly clarify.
Regards
Peter Kwan |
|