56fd70892dee834e6172a3fbd8c0905cd52e71cb
FAQ/How-do-I-set-only-one-Y-axis-in-a-chart.md
| ... | ... | @@ -39,7 +39,7 @@ public override void CustomizeChart(object chart, Hashtable properties) |
| 39 | 39 | return; |
| 40 | 40 | |
| 41 | 41 | string pattern = @"var\s+(?BarChart\d+Instance);"; |
| 42 | - string chartVarName = Regex.Match(strChart, pattern).Groups["chartvarname"].Value; |
|
| 42 | + string chartVarName = Regex.Match(strChart, pattern).Groups[1].Value; |
|
| 43 | 43 | |
| 44 | 44 | sb = sb.Replace("} catch (e) {", "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) {"); |
| 45 | 45 | } |