Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在asp.net中将图表标题显示为dropdownlist选定项_C#_Asp.net_Charts - Fatal编程技术网

C# 如何在asp.net中将图表标题显示为dropdownlist选定项

C# 如何在asp.net中将图表标题显示为dropdownlist选定项,c#,asp.net,charts,C#,Asp.net,Charts,如果我从下拉列表中选择了一个项目,那么它会在图表控件中将文本显示为标题 <asp:Chart ID="Chart1" runat="server" Height="350px" Width="600px" Style="text-align: center; margin-left: auto; margin-right: auto; "> <Titles> <asp:Title Font="Times N

如果我从下拉列表中选择了一个项目,那么它会在图表控件中将文本显示为标题

 <asp:Chart ID="Chart1" runat="server"  Height="350px" Width="600px" Style="text-align: center;
        margin-left: auto; margin-right: auto; ">
        <Titles>

           <asp:Title Font="Times New Roman, 12pt, style=Bold, Italic" Name="Title1" Text="Daily MeatSale Graph" >
           </asp:Title>

       </Titles>

       <Legends>
           <asp:Legend Docking="Bottom" IsTextAutoFit="False" Name="MeatinKgs" LegendStyle="Row" />
       </Legends>
       <Series>
           <asp:Series Name="Meat in Kgs" ToolTip="#VALX [#VALY Kgs]" YValuesPerPoint="1" />
       </Series>
       <ChartAreas>
           <asp:ChartArea Name="ChartArea1">
           </asp:ChartArea>
       </ChartAreas>
   </asp:Chart>

  string s = "Daily MeatSale Graph - " + Request.QueryString["branchname"].ToString();
  Chart1.ChartAreas[0].AxisX.Title = "Dates";
  Chart1.ChartAreas[0].AxisY.Title = "Meat In Kgs";
  Chart1.Titles.Add(s);