日期:2014-05-20 浏览次数:20984 次
<DCWC:Chart ID="Chart1" runat="server" BorderLineColor="185, 195, 208" BorderLineStyle="Solid" Width="740px" Height="390px" OnCallback="Chart1_Callback" Palette="Excel" BackGradientEndColor="229, 233, 240" BackGradientType="TopBottom" > <Series> <DCWC:Series ChartType="SplineRange" Name="Series1" BackGradientType="TopBottom" XValueType="DateTime" BorderColor="DarkSlateGray" > </DCWC:Series> <dcwc:Series ChartType="SplineRange" Name="Series2"> </dcwc:Series> <dcwc:Series ChartType="SplineRange" Name="Series3"> </dcwc:Series> <dcwc:Series ChartType="SplineRange" Name="Series4"> </dcwc:Series> </Series> <ChartAreas> <DCWC:ChartArea Name="Default" BorderColor="Gray" BorderStyle="Solid" BackColor="Transparent"> <AxisX Margin="False" LabelsAutoFit="False" Title="时间"> <MajorGrid LineColor="Silver" Interval="30" IntervalType="Seconds" /> <LabelStyle Format="T" Font="Trebuchet MS, 7.75pt" FontColor="128, 0, 0, 0" Interval="30" IntervalType="Seconds" /> <MajorTickMark Size="2.5" Style="cross" Interval="10" IntervalType="Seconds" /> </AxisX> <AxisY StartFromZero="False" Title="数值"> <LabelStyle Format="N2" /> <MajorGrid Interval="Auto" IntervalType="Auto" LineColor="Silver" /> </AxisY> </DCWC:ChartArea> </ChartAreas> <Titles> <dcwc:Title Color="26, 59, 105" Font="Trebuchet MS, 8.25pt, style=Bold" Name="Title1" Text="实时图表"> </dcwc:Title> </Titles> <Legends> <dcwc:Legend BackColor="Transparent" BorderColor="Black" Docking="Top" Name="Default"> </dcwc:Legend> </Legends> </DCWC:Chart>
pidx = Chart1.Series[0].Points.AddXY(xDate, seriesValue1); foreach (DataPoint p in Chart1.Series[0].Points) { Chart1.Series[0].Points[pidx].MapAreaAttributes = String.Format("href=\"javascript:drill(';sm-{0:yyyyMM};c','', 'CornflowerBlue')\" onmouseover=\"dispData('{0}','{1:T}','{2:#0.00}')\" onmouseout=\"hideData()\"", ddlYCName1.SelectedValue,DateTime.FromOADate(p.XValue), p.YValues[0]); Chart1.Series[0].Points[pidx].ToolTip = String.Format("Click here for sales data vs. categories in {0:MMM yy} ", DateTime.FromOADate(p.XValue)); }