Aloha guys,
I would like to create a scatter chart similar to picture shown as above using UltraChart but i faced a few problems as follow:
1) I want AXIS-Y to start from 0 to -20 (which is unusual i know) and I want to be able to defined the range of the scale by myself, but i wonder how can i do it in UltraChart?
2) How can I create another 2 additional axes (the 2 red lines shown on the picture) on the chart?
Thanks
Well to do this with the current UltraChart I would suggest taking the absolute values of your data, then plot it from 0-20 on the Y and 0-20 on the X by doing the following:
1) You can define the range of the scale by going to Axis-> X->RangeType = Custom, and then setting the RangeMax and RangeMin of the X Axis. Do the same for the Y, which in both cases would be Min=0 Max=20. Now go to Axis->X->Labels-ItemFormatString and set it to"-<DATA_VALUE:0.##>" So now your graph should look like it's graphing from 0 to -20, and all your data points will be correctly plotted (as long as you take their absolute value).
2) To add those 2 additional axes I would suggest handling the FillSceneGraph event which will allow you to draw any arbitrary shape or text. Here's a link to more information about handling the FillSceneGraph event: http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Chart_Modify_Scene_Graph_Using_FillSceneGraph_Event.html
Finally, I hope this helps and let me know how it goes. -Paul
Paul Cavallaro"]1) You can define the range of the scale by going to Axis-> X->RangeType = Custom, and then setting the RangeMax and RangeMin of the X Axis. Do the same for the Y, which in both cases would be Min=0 Max=20. Now go to Axis->X->Labels-ItemFormatString and set it to"-<DATA_VALUE:0.##>" So now your graph should look like it's graphing from 0 to -20, and all your data points will be correctly plotted (as long as you take their absolute value).
I had managed to define the range of the scale by following what you mentioned here but I'm not able to change the ItemFormatString to "-<DATA_VALUE:0.##>" even though I had change the ItemFormat to "Custom"..... Seems like it'll auto revert back to its original value whenever i start debugging...... Is this some kind of bug?
Paul Cavallaro"] 2) To add those 2 additional axes I would suggest handling the FillSceneGraph event which will allow you to draw any arbitrary shape or text. Here's a link to more information about handling the FillSceneGraph event: http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Chart_Modify_Scene_Graph_Using_FillSceneGraph_Event.html
I can't find the event "FillSceneGraph" under UltraChart.... Do i need to create the event myself?
1) This is weird, because I don't have this problem at all. Could you tell me what version of UltraChart you have as well as the CLR so I can look into this?
2) What you can do is under the design view just go to the properties pane, then click on the lightning bolt (Events) and then scroll down to FillSceneGraph and double click the empty cell to its right. This will auto create you a method that will handle the FillSceneGraph event and from there you can add your special handling. (If you don't see the FillSceneGraphEvent you're probably using something earlier than v.7.3, in which case we'll have to find another way to do it)
Hope this helps, and let me know how it goes.
-Paul
Paul Cavallaro"]1) This is weird, because I don't have this problem at all. Could you tell me what version of UltraChart you have as well as the CLR so I can look into this?
UltraChart version should be 7.1.20071.40 while i'm using NetAdvantage for .NET 2007 volume1 CLR 2.0
Paul Cavallaro"]2) What you can do is under the design view just go to the properties pane, then click on the lightning bolt (Events) and then scroll down to FillSceneGraph and double click the empty cell to its right. This will auto create you a method that will handle the FillSceneGraph event and from there you can add your special handling. (If you don't see the FillSceneGraphEvent you're probably using something earlier than v.7.3, in which case we'll have to find another way to do it)
Yep, I'm doing the same thing but I guess I'm using the older version
Seems like I'm having another problem with the UltraChart control..... The X-axis label of my chart is overlapping with the legend..... I'd tried to change the X-axis label "orientation" to "custom" & "orientation angle" to "45" but the outcome become even worse...... Is it some sort of bugs? because i found that some one in the forum having the same problem as mine....
I consider this a bug ... it might already be fixed, though; try downloading the latest hotfix for 7.1 and testing with that.
The properties under Axis.X.Labels.Layout might be able to fix this, too.