Solved

multiple charts in the same window

Posted on 2013-12-05
1
124 Views
Last Modified: 2014-06-28
Hello all ,
I am trying to display multiple charts in the same window
here is the code :
  Dim quey As String = "SELECT COUNT(TransactionID) AS Transactions , convert ( datetime , CONVERT(varchar, DepositTime, 111))  AS date FROM dbo.[Transactions] where  DepositTime between '1/1/2013 00:00:00' and '1/1/2014 23:59:59' GROUP BY CONVERT(varchar, DepositTime, 111) "
        Dim dss As New DataSet
        dss = DBToolBox.DB_Select(quey)

        Chart1.DataSource = dss
        Chart1.Series(0).Name = "Transactions/Day"
        Chart1.Series(0).XValueMember = "date"
        Chart1.Series(0).YValueMembers = "Transactions"

        Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.SplineArea


        Chart1.DataBind()

        Threading.Thread.Sleep(5 * 1000)



        quey = "SELECT COUNT(t.TransactionID) AS Transactions , d.DepositerName AS depositors FROM dbo.[Transactions] t , Depositers d where T.DepositerID = D.DepositerID and DepositTime between '1/1/2013 00:00:00' and '1/1/2014 23:59:59' GROUP BY d.DepositerName  "

        dss = DBToolBox.DB_Select(quey)

        Chart1.DataSource = dss
        ''  Chart1.Series.Add("depositor/transaction")


        Chart1.Series(0).XValueMember = "depositors"
        Chart1.Series(0).YValueMembers = "Transactions"

        Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Pie

        Chart1.DataBind()

        Threading.Thread.Sleep(5 * 1000)


        quey = "SELECT sum(t.DepositValue) AS DepositValue , d.DepositerName AS depositors FROM dbo.[Transactions] t , Depositers d where T.DepositerID = D.DepositerID and DepositTime between '1/1/2013 00:00:00' and '1/1/2014 23:59:59' GROUP BY d.DepositerName  "

        dss = DBToolBox.DB_Select(quey)

        Chart1.DataSource = dss
        '  Chart1.Series.Add("depositor/transaction")


        Chart1.Series(0).XValueMember = "depositors"
        Chart1.Series(0).YValueMembers = "DepositValue"

        Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Area



        Chart1.DataBind()

Open in new window


the problem that it displays the last chart only
Any Help ?!
0
Comment
Question by:AhmedHindy
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 39699849
I only see one chart object, so I don't understand how you are trying to show multiple charts.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now