Jump to content
Software FX Community

Decimals in the X-Axis


Grorange
 Share

Recommended Posts

If I understand things correctly, we are not allowed to use decimals in the x-axis.

If this is so, we need decimal values in the x axis.  I have thought of a way to get around this but would like some feedback before I try anything.  So, here goes...

Instead of using decimals, I'll use the normal integer indexing.  I'll do everything as intended and even start at index 0.  However, instead of printing the indexes, I'll print my own labels, which will be string representations of the floating values we are really looking at.

This complicates things because now I'll need to map each decimal value with an index (just simple math...) but I can see complications coming out of this, such as rounding errors to get the wrong datapoint.

Has anyone tried anything like this?  Is this the best way to approach this "opportunity"?

Thanks for your inputs,

Grorange

Link to comment
Share on other sites

There are two kinds of X-Axis: Categorical and Numerical. The type your chart has depends on two things:

1) The main gallery (AllSeries.Gallery) being used. The following galleries don't support numerical X-Axis: Bar,HilowClose,Candlestick,Cube,Pareto.

2) Whether or not you are passing X-Values.

A categorical X-Axis is an axis that has one unit for every point in the chart. The scale of the axis is determined solely by the number of points in the chart and the available size. All point are equally spaced in the X-coordinate.  

A numerical X-Axis is much like the Y-Axis, the scale is not Dependant on the number of points but on the X-Value of those points. Numerical X-Axis can have decimals.

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.

Guest
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.

 Share

×
×
  • Create New...