?
Solved

multiple charts in the same window

Posted on 2013-12-05
1
Medium Priority
?
127 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 1000 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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 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