Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

asp.net chart, multiple series?

Posted on 2014-03-06
2
Medium Priority
?
1,934 Views
Last Modified: 2014-03-07
Hi all,

I'm trying to setup an asp.net vb chart control to use multiple series.

Here's my code:

    <asp:Chart ID="chtMovies" runat="server" DataSourceID="srcMovies">
            <Series>
                <asp:Series Name="MovieCategorySeries" ChartType="Line"
                                  XValueMember="Category" YValueMembers="Count">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="MovieChartArea">
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
    
    <asp:SqlDataSource
        id="srcMovies"
        ConnectionString="<%$ ConnectionStrings:Movies %>"
        SelectCommand="CountMoviesInCategory"
        SelectCommandType="StoredProcedure"
        Runat="server" /> 

Open in new window


As you can see i have the one series which pulls two columns from a stored procedure (which only returns two columns)

So how do i go about adding another series?


Thanks,
0
Comment
Question by:ErinTheCoderGirl
[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
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 39909014
Change the stored procedure to return the third column and add another one of these

            <Series>
                <asp:Series Name="MovieCategorySeries" ChartType="Line"
                                  XValueMember="Category" YValueMembers="Count">
                </asp:Series>
            </Series>
0
 

Author Closing Comment

by:ErinTheCoderGirl
ID: 39911976
Perfect thanks
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

618 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