如何在新选项卡中显示图表 [英] How to display chart in new tab
问题描述
我的代码如下
<< asp:Chart ID =chart2runat =serverWidth =747px>
< series>
< asp:Series Name =ApprovedLabel =Legend =Legend1>
< asp: Series Name =RejectedLabel =Legend =Legend1>
< asp:Series Name =PendingLabel =Legend =Legend1>
< chartareas>
< asp:ChartArea Name =ChartArea1>
< legends>
< asp:传奇名称=Legend1>
i有一个按钮,当我点击按钮图表时会显示。
我点击按钮的代码如下
chart2.Visible = true;
chart2.Series [0] .Points.Add (new DataPoint(0,5));
chart2.Series [0] .Points.Add(new DataPoint(1,12)) ;
chart2.Series [0] .Points.Add(new DataPoint(2,18));
chart2.Series [0] .Points.Add(new DataPoint (3,22));
chart2.Series [1] .Points.Add(new DataPoint(0,10)) ;
chart2.Series [1] .Points.Add(new DataPoint(1,14));
chart2.Series [1] .Points.Add(new DataPoint (2,19));
chart2.Series [1] .Points.Add(new DataPoint(3,23));
i想要在新标签中显示图表以了解该怎么做
我尝试了什么: < br $> b $ b
my code as follows
<<asp:Chart ID="chart2" runat="server" Width="747px">
<series>
<asp:Series Name="Approved" Label="" Legend="Legend1">
<asp:Series Name="Rejected" Label="" Legend="Legend1">
<asp:Series Name="Pending" Label="" Legend="Legend1">
<chartareas>
<asp:ChartArea Name="ChartArea1">
<legends>
<asp:Legend Name="Legend1">
i have one button, when i click the button chart will display.
My code for button click as follows
chart2.Visible = true;
chart2.Series[0].Points.Add(new DataPoint(0, 5));
chart2.Series[0].Points.Add(new DataPoint(1, 12));
chart2.Series[0].Points.Add(new DataPoint(2, 18));
chart2.Series[0].Points.Add(new DataPoint(3, 22));
chart2.Series[1].Points.Add(new DataPoint(0, 10));
chart2.Series[1].Points.Add(new DataPoint(1, 14));
chart2.Series[1].Points.Add(new DataPoint(2, 19));
chart2.Series[1].Points.Add(new DataPoint(3, 23));
i want to display chart in new tab for that how to do
What I have tried:
my code as follows
<<asp:Chart ID="chart2" runat="server" Width="747px">
<series>
<asp:Series Name="Approved" Label="" Legend="Legend1">
<asp:Series Name="Rejected" Label="" Legend="Legend1">
<asp:Series Name="Pending" Label="" Legend="Legend1">
<chartareas>
<asp:ChartArea Name="ChartArea1">
<legends>
<asp:Legend Name="Legend1">
i have one button, when i click the button chart will display.
My code for button click as follows
chart2.Visible = true;
chart2.Series[0].Points.Add(new DataPoint(0, 5));
chart2.Series[0].Points.Add(new DataPoint(1, 12));
chart2.Series[0].Points.Add(new DataPoint(2, 18));
chart2.Series[0].Points.Add(new DataPoint(3, 22));
chart2.Series[1].Points.Add(new DataPoint(0, 10));
chart2.Series[1].Points.Add(new DataPoint(1, 14));
chart2.Series[1].Points.Add(new DataPoint(2, 19));
chart2.Series[1].Points.Add(new DataPoint(3, 23));
i want to display chart in new tab for that how to do
推荐答案
c# - ASP.NET图表单击,传递数据和新选项卡 - 堆栈溢出 [ ^ ]
您需要在表单中添加target =_ blank
You need to add target="_blank" to your form
<form runat="_server" target="_blank">
你是怎么做到的取决于你没有提到的事情,但这就是你需要的地方。
How you do that depends on things you haven't mentioned, but that's where you need to be.
这篇关于如何在新选项卡中显示图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!