Chart?

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
1 post Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Chart?
Dummy1912
How can we show our chart with all names and with currency?

not really an idea how to use our chart with sqlite db
Code: Select all
Public Sub GenerateChart()
        Dim CArea As ChartArea = Chart1.ChartAreas(0)
        CArea.BackColor = Color.Azure           '~~> Changing the Back Color of the Chart Area 
        CArea.ShadowColor = Color.Red           '~~> Changing the Shadow Color of the Chart Area 
        CArea.Area3DStyle.Enable3D = True       '~~> Changing the Chart Style to 3D 

        '~~> Formatting X Axis
        'CArea.AxisY.Interval = 0.2
        Chart1.Series("Series1").ChartType = SeriesChartType.Column
        '~~> Setting label's Fore Color
        Chart1.Series("Series1").LabelForeColor = Color.DarkGreen
        CArea.AxisY.LabelStyle.Format = FormatCurrency(0, 2)

        '~~> Display Data Labels
        Chart1.Series("Series1").IsValueShownAsLabel = True
        Chart1.Series("Series1").Font = New System.Drawing.Font("Verdana", 8)
        Chart1.Series("Series1")("LabelStyle") = "Top"

        Dim attributes As String = "Vendors.name,transactions.amount,groups.type"
        Dim fromClause As String = "LEFT JOIN Vendors ON transactions.vendor = Vendors.id LEFT JOIN Groups ON transactions.type = groups.id"

        Dim whereClause As String = "transactions.type ='1' AND transactions.setdate BETWEEN '2017-10-01' AND '2017-10-15'"

        Dim tblFields As SQLiteDataReader = DataBase.executeQuery("SELECT " & attributes & " FROM transactions " & fromClause & " WHERE " & whereClause & ";")

        While tblFields.Read
            '~~> SET DATA SOURCE <~~'
            Chart1.Series("Series1").Points.AddXY(tblFields.GetValue(0), FormatCurrency(tblFields.GetValue(1), 2))
        End While
        tblFields.Close()

    End Sub
https://drive.google.com/open?id=0B37cl ... XRSNTlxMzQ

don't show all names of Vendors.name and don't show my amounts with formatcurrency?
show only vendors.name on the lines where the chart has been paint :( ... why?
how can we draw lines on the chart to show all names?
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
1 post Page 1 of 1
Return to “Coding Help & Support”