Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15088

Highlighting a single bar on a chart

$
0
0
Hey Guys,

I have a bar chart that is populated from a database, and is stock levels. So x is the product name (text) and Y is the quantity. The chart draws fine. But I would like to search the products on the x and highlight that bar if it matches the search in the Text box.

I have tried a few things but cant seem to find the correct item to get me the product..

Code:

        Dim PointsCount As Integer
        For PointsCount = 0 To CardChart.Series(0).Points.Count - 1
            If CardChart.Series(0).Points(PointsCount).XValue = TextBox_Alert.Text Then
                CardChart.Series(0).Points(PointsCount).Color = Color.Red
            End If

        Next


Viewing all articles
Browse latest Browse all 15088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>