activex - Teechart Bar Chart SIngle Bar Pattern -
how can provide pattern single bar of series.say suppose series has 4 bars on click on bar pattern should change. know functionality of changing color of particular point.
you store patterns in array , set them @ ongetseriesbarstyle
event. here have example:
dim mypatterns() integer private sub form_load() tchart1.addseries scbar tchart1.series(0).fillsamplevalues redim mypatterns(tchart1.series(0).count) dim integer = lbound(mypatterns) ubound(mypatterns) mypatterns(i) = 0 next end sub private sub tchart1_onclickseries(byval seriesindex long, byval valueindex long, byval button teechart.emousebutton, byval shift teechart.eshiftstate, byval x long, byval y long) if seriesindex > -1 , valueindex > -1 mypatterns(valueindex) = (mypatterns(valueindex) + 1) mod 20 end if tchart1.repaint end sub private sub tchart1_ongetseriesbarstyle(byval seriesindex long, byval valueindex long, barstyle teechart.ebarstyle) if seriesindex > -1 , valueindex > -1 tchart1.series(seriesindex).asbar.barbrush.clearimage tchart1.series(seriesindex).asbar.barbrush.style = mypatterns(valueindex) end if end sub
Comments
Post a Comment