Jump to content
Software FX Community

Axis object not shown

Recommended Posts

when implementing an application with C#, I tried to follow an example provided by SoftwareFX to access the Axis object, and it does not show.

 Here are lines of related code:

private AxChartfxLib.AxChartFX chtPitScour;

this.chtPitScour = new AxChartfxLib.AxChartFX();

when I tried this


I expect to have all the available objects and property showing in the inteliSense tool box, but no Axis.




It would so much appreciated if anyone can provide some hints on this.


Link to post
Share on other sites


Thanks very much for your reply, but I am sorry I forgot to mention in my previous post. I am still using the ChartFX Client Server v5.0 and VS 2003 (C#).

I do try one more time to type in


I do expect to see something like Axis, but no luck

All I see which are start with 'A' are:











This is the last try. If it is not workable, I'll shift to new versions. Thanks again for your help!

Link to post
Share on other sites
  • 2 weeks later...


Thanks so much, and I finally made the ChartFX 5.0 work in the VS 2003.

But there comes the new issue:

1. I can not set the title for the chart. I used the following code, but it reports that the Title object not exist. I checked the Help manual for ChartFX 5.0, it says this is valid code. Based on different scenario I need to change the chart title. so I can not hard code this. Please help to verify if this Title works on your machine.

chart.Title(ChartfxLib.CfxTitle.CHART_TOPTIT) = "Pit Scour Headcut and Tailcut";

2. In the application developed, I try to plot the Y values based on the changes of X values. But the Y values do not change very significantly even with the sinificant changes of X. For example, when X value increases from 1 to 100, Y value only changes from 1 to 2. So how can I use the scale function to show the noticeable change of Y value? It would be nice to have part of sample code available.

Link to post
Share on other sites

1) You are getting into some Interop Blues. Not everything translates as expected from COM to .NET. For Title:


CfxTitle.CHART_TOPTIT,"Pit Scour Headcut and Tailcut");

2) What do you want to see? You can make the Y-Axis sale smaller (say Min = 0, Max = 5) in order for small changes to be more visible.


Link to post
Share on other sites

Thanks so much Frank.

The solution for my first question works so good.

Sorry, I did not make my second point clear enough. For example I made my AxisX to be 20 in max, but the data plotted in the AxisX is more than 200. So if I want to see X values larger than 20, I need to use the horizontal scroll. That looks very silly. What I was trying to ask is if there is a way we can make all the X values fit in the AxisX no matter how larger the X values are by scaling the X value, and we do not have to scale the Y value to exggerate the value change of Y so that the user can notice such change easily.

By the way, is there a way I can attach an image with this post? I tried it, but it shows as a little X only.

Thanks again.

Link to post
Share on other sites

So you want to eliminate the scrollbar? Is that it?

chart1.Style &= ~ChartfxLib.


As for attaching files, make sure you don't attach a link but an actual file. Also make it a PNG or JPEG so that it is not too big. There are many postings with picture attachments, I don't think there is a problem.

Link to post
Share on other sites
  • 2 weeks later...

Hi, Frank

Here it comes again all over!!! Last weekend I powered off my machine without closing all the open applications including the ChartFX. This Monday those working modules are not working any more. I thought some of the ChartFX installed module might be corrupted. So I rerun the ChartFX installation package by choosing the 'Repair" option, but issue is still not fixed.

So I redid everything. Here I will tell in details what I have done, and hopefully you can help me out. After I open the VS 2003 IDE, I right click some where in the 'Toolbox', and then choose 'Add/Remove Item ...', then check the "ChartFX Object" and "ChartFX Client Server for Windows CE" in the COM Component tab in the "Customized Toolbox" pop-up window. After I draw a chart using either "ChartFX Object" and "ChartFX Client Server for Windows CE", "AxChartfxLib" and "ChartfxLib" should be added in automatically under 'Reference' in the "Solution Explorer" window in VS IDE. As I remember only one of the two tools "ChartFX Object" and "ChartFX Client Server for Windows CE" is the right one to use for my case. But this time I tried both, none is good. The following are several lines of code, which were working good, but are not working any more. Those green font lines were working, but now commented out because they are not working. The error given is "AxChartfxLib.AxChartFX does not contain the definition of XXX" where XXX is the property like Cluster, Menubar, Series,and etc. Can you give me another rescue from the info I provide. Walter's steam engine might be working on Mercede's chassiss, but it needs a lot 'tune up's, right? :(

Isn't it nice if the boss can grant some more bucks to upgrade this ChartFX to a newer version?!!


private AxChartfxLib.AxChartFX chartPitScour;

chartPitScour.Chart3D =


// chartPitScour.Cluster = false;

// chartPitScour.ContextMenus = true;

chartPitScour.ToolBar =


// chartPitScour.MenuBar = true;

// chartPitScour.ShowTips = true;

// chartPitScour.Scrollable = false;

// chartPitScour.DataEditor = false;

// chartPitScour.AllowEdit = false;

// chartPitScour.Axis[ChartfxLib.CfxAxisIndex.AXIS_X].AutoScale = true;

// chartPitScour.Axis[ChartfxLib.CfxAxisIndex.AXIS_Y].AutoScale = false;

// chartPitScour.Axis[ChartfxLib.CfxAxisIndex.AXIS_X].Min = AxisXMin;

// chartPitScour.Axis[ChartfxLib.CfxAxisIndex.AXIS_X].Max = AxisXMax;

// chartPitScour.Axis[ChartfxLib.CfxAxisIndex.AXIS_Y].Min = AxisYMin;

// chartPitScour.Axis[ChartfxLib.CfxAxisIndex.AXIS_Y].Max = AxisYMax;


// chartPitScour.Series[tailSer].Gallery = ChartfxLib.CfxGallery.CURVEAREA;

// chartPitScour.Series[tailSer].Border = true;

// chartPitScour.Series[tailSer].LineWidth = 1;

// chartPitScour.Series[tailSer].LineStyle = ChartfxLib.CfxLineStyle.CHART_SOLID;

// chartPitScour.Series[tailSer].Volume = 75;

// chartPitScour.Series[tailSer].Legend = "Tailcut";

// chartPitScour.OpenDataEx(ChartfxLib.CfxCod.COD_COLORS, 4, 0);

// chartPitScour.Series[tailSer].BorderColor = 0xFFFF00;

// chartPitScour.Series[tailSer].Color = 0xFFFF99;

// chartPitScour.CloseData(ChartfxLib.CfxCod.COD_COLORS);

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...