e5b923159fed649a01df2d0d715ddb75acda8667
FAQ/How-do-I-set-only-one-Y-axis-in-a-chart.md
| ... | ... | @@ -106,6 +106,7 @@ public override void CustomizeDundasChart(object chart, Hashtable properties, Ty |
| 106 | 106 | |
| 107 | 107 | ###VB (Dundas Engine) |
| 108 | 108 | ```visualbasic |
| 109 | +//Сode to use a common (left) Y axis: |
|
| 109 | 110 | Public Overrides Sub CustomizeDundasChart(chart As Object, properties As Hashtable, chartType As Type) |
| 110 | 111 | If chartType.FullName <> "Izenda.AdHoc.DundasBarChart" Then |
| 111 | 112 | Return |
| ... | ... | @@ -119,4 +120,24 @@ Public Overrides Sub CustomizeDundasChart(chart As Object, properties As Hashtab |
| 119 | 120 | dchart.Series(1).YAxisType = Dundas.Charting.WebControl.AxisType.Primary |
| 120 | 121 | End If |
| 121 | 122 | End Sub |
| 123 | + |
|
| 124 | + |
|
| 125 | + |
|
| 126 | +//Code to hide the right Y axis: |
|
| 127 | +Public Overrides Sub CustomizeDundasChart(chart As Object, properties As Hashtable, chartType As Type) |
|
| 128 | + If chartType.FullName <> "Izenda.AdHoc.DundasBarChart" Then |
|
| 129 | + Return |
|
| 130 | + End If |
|
| 131 | + |
|
| 132 | + Dim dchart As Dundas.Charting.WebControl.Chart = TryCast(chart, Dundas.Charting.WebControl.Chart) |
|
| 133 | + If dchart Is Nothing Then |
|
| 134 | + Return |
|
| 135 | + End If |
|
| 136 | + |
|
| 137 | + For Each chartArea As Dundas.Charting.WebControl.ChartArea In dchart.ChartAreas |
|
| 138 | + chartArea.AxisY2.Enabled = Dundas.Charting.WebControl.AxisEnabled.False |
|
| 139 | + Next |
|
| 140 | + MyBase.CustomizeDundasChart(chart, properties, chartType) |
|
| 141 | + |
|
| 142 | + End Sub |
|
| 122 | 143 | ``` |
| ... | ... | \ No newline at end of file |