vb.net - How can i make a point in a chart equal the value of a textbox? -


in project have created chart , want there same number of points in textboxes, how can that? code

 public class form1       dim object       dim b object  private sub button7_click(sender object, e eventargs) handles button7.click     chart1.anchor = anchorstyles.bottom or anchorstyles.left or anchorstyles.right or anchorstyles.top     chart1.chartareas(0).axisx.maximum = 20     chart1.chartareas(0).axisy.maximum = 30     chart1.chartareas(0).axisx.minimum = -20     chart1.chartareas(0).axisy.minimum = -30     chart1.chartareas(0).axisy.interval = 5     chart1.chartareas(0).axisx.interval = 5     chart1.chartareas(0).axisx.crossing = 0     chart1.chartareas(0).axisy.crossing = 0     chart1.chartareas(0).axisx.linewidth = 2     chart1.chartareas(0).axisy.linewidth = 2     chart1.chartareas(0).axisy.majorgrid.linecolor = color.black      = new datapoint(0, 0)     a.label = "#valx : #valy"     a.markerstyle = markerstyle.circle     a.markersize = 5     chart1.series(0).points.add(a) end sub 

and want datapoints

 =(val(textbox1.text),val(textbox2.text)) 

in below example created collection of textboxes , looped through them adding x , y coordinates textboxes

private sub button2_click(sender system.object, e system.eventargs) handles button2.click      dim xtbs() textbox = {textbox1, textbox3, textbox5}     dim ytbs() textbox = {textbox2, textbox4, textbox6}      integer = 0 xtbs.length - 1         dim x double = xtbs(i).text         dim y double = ytbs(i).text         dim pt = new datapoint(x, y)         chart1.series(0).points.add(pt)     next  end sub 

enter image description here


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -