Jump to content
Software FX Community

Chart fx 7 - X Axis proportional spacing of values


Recommended Posts


we are using bar chart of chart fx 7 and how do we achieve proportional spacing of values in the x axis.

For Ex: if our values are 1,2,20 and 45 in x axis then we dont want the same spacing. Distance between 1 and 2 should be lesser than distance between 2 and 20 and so on for 20 and 45.

Please let us know how to do this.





Link to comment
Share on other sites

Hi Arjun,

You need to give each point an X value. Like so:


chart1.Data.X[0, 0] = 1;

chart1.Data.X[0, 1] = 2;

chart1.Data.X[0, 2] = 20;

chart1.Data.X[0, 3] = 45;

chart1.Data.Y[0, 0] = myValue;

chart1.Data.Y[0, 1] = myValue;

chart1.Data.Y[0, 2] = myValue;

chart1.Data.Y[0, 3] = myValue;

Link to comment
Share on other sites

Hi Andre

Thanks for your reply . I did try giving x value , but what happened was the

Data in the x axid started getting plotted proportionally

But the labels for the same along the x axis never moved

Proportionally . For ex : if x axis labels were 1m, 2m, 5m,10m

Pointing to data 1,2,5 and 10 along the x axis , after setting x value

What happened was the spacing between data 1 and 2 was different from spacing between

Data 2 and 5 and 5 and 10 which is what I expected .

But the corresponding labels 1m,2m,5m and 10m didn't have proportional

Spacing and they still remained in their old position .

I'm sure I'm doing something wrong but not quite clear.

I understand that setting x value adjusts the spacing

Between data but along with that does it automatically

Take care of adjusting spacing between labels as well which are corresponding

To this data ? We use a data table as the data source

And we use the chart fx .net API method data source

Settings.fields , create a field map and set one column in datatable as x value and other column

For x axis as label and three columns of datatable as values for the three series ( 2 line and 1 bar)

Please help with this .

Link to comment
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...