Solved

multiple charts in the same window

Posted on 2013-12-05
1
126 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 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