Solved

multiple charts in the same window

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

12 Experts available now in Live!

Get 1:1 Help Now