Solved

multiple charts in the same window

Posted on 2013-12-05
1
123 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 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

20 Experts available now in Live!

Get 1:1 Help Now