I have a need to access a charts properties in a module that processes custom labels for 5 different charts using the same routine/module for each chart. The module I created works for the 1st chart but the name of the chart has to change via a string variable passed to change the chart I’m formatting. It’s a stream lining thaingy. One label formatting routine for 5 different charts. I tried making a chart array but Vb.net won’t do that. I’ve tried using FindControl method but the IDE didn’t like it.
ie. placeholder = ((Chart)Me.FindControl(txtName & cstr(r))).Text or some such thing.
error msg is chart is not defined or some such thing.
I need to pass a string variable from the call to the mod to sub the chart name so one routine can deal with all 5 charts … otherwise I have to un streamline and make modules for each chart. I had it all working with all the code in the form body … now it won’t work because the module only has one chart name and cannot change unless it can use a passed variable to change it’s name.
VertDeltas649_Chrt_frm.VDeltaChrt1_9.Series(Chart).Points(Number – 1)(“LabelStyle”) = “Top”
VDeltaChrt1_9 is where the variable needs to go … an indexed or variable string substitute.
This chart name needs to change from VDeltaChrt1_9 to the next name VDeltaChrt10_19 and the next VDeltaChrt20_29 etc. The variable “Number” is the point index.
Any ideaz will be appreciated
Tried everything suggested here on sub stack.
I was expecting at least one thing to work … so far no go.