简体   繁体   中英

Can we draw Tertiary Y Axis with the use of chart control

I want to draw a graph which has 2 different Y axis with one X Axis. Can we take different Y axis for different series? In first series I want candlestick graph and in second column chart, both charts should be in same chart area and should not be mixed with each other.

For example you can see the picture below

A ChartArea can have two x-axes and two y-axes.

The secondary axes are called

 chartArea.AxisX2 

and

 chartArea.AxisY2

Enable them like this:

  chartArea.AxisY2.Enabled = AxisEnabled.True;

Now you can style them as usual..

You can relate a Series to one of the Axes by setting the AxisType like this:

 yourSeries.YAxisType = AxisType.Secondary;

Talking about axes: It is worth knowing that you can move them relative to each other by setting their Crossing ; see here for an example ..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM