?
Solved

asp.net chart, multiple series?

Posted on 2014-03-06
2
Medium Priority
?
1,897 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
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…
Suggested Courses

752 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