FAQ/How-do-I-set-only-one-Y-axis-in-a-chart.md
... ...
@@ -102,7 +102,31 @@ public override void CustomizeDundasChart(object chart, Hashtable properties, Ty
102 102
103 103
```
104 104
105
+###VB (HTML Engine)
106
+```visualbasic
107
+'Code to hide the right Y axis:
108
+ Public Overrides Sub CustomizeChart(chart As Object, properties As Hashtable)
109
+ If TypeOf chart Is StringBuilder Then
110
+ Dim sb As StringBuilder = DirectCast(chart, StringBuilder)
111
+ Dim strChart As [String] = sb.ToString()
112
+
113
+ If Not strChart.Contains("BarChart") Then
114
+ Return
115
+ End If
116
+
117
+ Dim pattern As String = "var\s+(?<chartvarname>BarChart\d+Instance);"
118
+ Dim chartVarName As String = Regex.Match(strChart, pattern).Groups("chartvarname").Value
119
+
120
+ sb = sb.Replace("} catch (e) {", (Convert.ToString((Convert.ToString((Convert.ToString((Convert.ToString("var yAxisLength = ") & chartVarName) + ".yAxis.length; if(yAxisLength > 1){ for(var i = 1; i < yAxisLength; ++i){") & chartVarName) + ".options.yAxis[i].labels.enabled = false; ") & chartVarName) + ".options.yAxis[i].title.text = null; ") & chartVarName) + ".yAxis[i].update();}}} catch (e) {")
121
+ End If
105 122
123
+ MyBase.CustomizeChart(chart, properties)
124
+ End Sub
125
+
126
+
127
+
128
+
129
+```
106 130
107 131
###VB (Dundas Engine)
108 132
```visualbasic