We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Customising the StockAndVolumeChartSample Sample

Thread ID:

Created:

Updated:

Platform:

Replies:

119228 May 26,2015 10:17 AM UTC May 27,2015 08:24 AM UTC Windows Forms 1
loading
Tags: Chart
FERNANDO ATIENZA
Asked On May 26, 2015 10:17 AM UTC

Welcome from France,

The sample StockAndVolumeChartSample is really useful. It allows to have 2 charts interiors inside an unique chart area.
You can see the picture inside the zip file.
By default the 2 series share the area and everyone has 50% of the space.
How can I use the chart component to impose by example the first serie has 2/3 of the area and the second 1/3 ?

By advance thank you for your help,

Fernando.

StockAndVolume.png


Attachment: StockAndVolume_8c6dd5a0.zip

Vinothkumar Arumugam [Syncfusion]
Replied On May 27, 2015 08:24 AM UTC

Hi Fernando Atienza,

We have analyzed your query.

You can able to customize chart size by ChartAxisLayout. ChartAxisLayout is used to add multiple axes collection .Each axis depends on one or more series.

You can achieve your requirements by applying following code snippet

Code Snippet [WF]:

· Create ChartAxisLayout

ChartAxisLayout layout1 = new ChartAxisLayout();

ChartAxisLayout layout2 = new ChartAxisLayout();

Layout1 for SecondaryAxis (yaxis)

Layout2 for PrimaryYAxis

· Add axes to the ChartAxisLayout

layout1.Axes.Add(yaxis);

layout2.Axes.Add(this.chartControl1.PrimaryYAxis);

· Set size of the layout as follows

layout1.Height =new System.Web.UI.WebControls.Unit("66%");

layout2.Height = new System.Web.UI.WebControls.Unit("34%");

· After completing above steps added these two layouts into chartControl.The chartControl has chart components.

this.chartControl1.ChartArea.YLayouts.Add(layout1);

this.chartControl1.ChartArea.YLayouts.Add(layout2);

Screenshot:

We have prepared a sample based on your requirements ,you can download it from below sample link

Sample Link:
Stock-and-Volume_Chart.zip

Please let us know if you have any concern.

Thanks,

Vinothkumar Arumugam.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;