Jump to content
Software FX Community

How to put some space between series bars.


anilgupt
 Share

Recommended Posts

  • 2 weeks later...

Setting the Volume property should do the trick. By adjusting the volume, you can modify the amount of space between the series; the larger the value, the lesser the distance between the selected series and its neighbors.

This property has a dual functionality depending on the clustered status of the chart, as follows:

1) If the chart is clustered, this property is used to specify the amount of space between the selected series and its neighbors in the z-axis (a.k.a. Gap Depth). When used in this context, this property is used for any chart type that supports clustered options (Including Multi-Type charts)

2) When the chart is not clustered, this property controls the amount of space between the selected series and its neighbors in the x-axis (a.k.a Gap Width). When used in this context, this property applies to any chart type that allows side to side positioning of the series (BAR, BUBBLE, CANDLESTICK, HI-LO-CLOSE, OPEN-HI-LOW-CLOSE and CUBES).

If you want to control the Volume property for a particular series or point in the chart you can use the Volume property supported by the Series and Point Class.

The following chart types must be set to Chart3D in order for this property to work:

LINES, CURVE, SCATTER, AREA, STEP, SURFACE, CURVEAREA, CONTOUR.

The volume property will not work with RADAR charts (even when Chart3D is set to TRUE).

You can do the following:

Chart1.Volume = 50; // Change 50 for whatever value you need to increase/decrease this space

Link to comment
Share on other sites

I am not sure what you mean by "space between chart", can you please explain?

In regards to changing the color of the AxisY labels, using the TextColor property will change it for the entire axis. You can do the following:

chart1.AxisY.TextColor = Color.Red;

You can also use AxisSections to change individual labels; you will need to set the From and To properties of the AxisSection to the same value on the y-axis:

SoftwareFX.ChartFX.AxisSection section2 = chart1.AxisY.Sections[0];

section2.From = 80;

section2.To = 80;

section2.FontStyle = System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic;

section2.TextColor = System.Drawing.Color.Red;

Link to comment
Share on other sites

In this case, the PixPerUnit property of the AxisX should do it.

The PixPerUnit property is very useful when you want to create a scroll bar associated with the selected axis or to increase the separation between tick marks. Its effect varies depending on the type of axis that is applied to, as follows:

Categorical Axis:

When you set a PixPerUnit to a categorical axis (e.g. X Axis) the value is an integer that will set the separation (physical distance measured in pixels) between major tick marks. The default PixPerUnit value for the X axis (when categorical) is 30 pixels. You may want to change the PixPerUnit value for a categorical axis when:

1) The labels associated with the chart are too long and do not fit in the allotted space. In this particular case the PixPerUnit should be increased. What will happen is that if all points do not fit in one screen a scroll bar will be shown. This scenario requires the Scrollable Property to be set to True.

2) You want to fit more points in one screen. In this particular case the PixPerUnit should be decreased. You must be careful with Labels associated with each tick mark if the PixPerUnit is too small.

3) You want to view a specific amount of points per screen. In this particular case we recommend the use of the SetScrollView Method as it will allow you to set these values without any calculations on your part.

4) If you don't want to show a scroll bar, you may set the PixPerUnit to zero (0). This will remove the scroll bar and Chart FX will set the appropriate PixPerUnit to fit all values in one screen.

If the Scrollable property is set to False, the PixPerUnit will not have any effect on the axis. So make sure the Scrollable property is set to True when using the PixPerUnit property.

You can do something like this:

chart1.Scrollable = true;

chart1.AxisX.PixPerUnit = 100;

Link to comment
Share on other sites

These are the only two properties that can provide separation between bars. If you are using the PixPerUnit property, please note that you need to set the Scrollable property to "true" as I stated before. Increasing the separation between the tickmarks will increase the separation between the bars.

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