第一个是我弄的,第二个是vs里设计界面里截图的,为什么就差距那么大呢?
以下是我aspx的代码,请高手指教一下应该要怎样设置,拜托,挺急的,感激万分!
1 <asp:Chart ID="Chart2" runat="server" AlternateText="图表加载中...">
2 <Series>
3 <asp:Series Name="Series1"
4 CustomProperties="PriceDownColor=Green, PriceUpColor=Red"
5 ChartType="Candlestick" YValuesPerPoint="4" BorderWidth="1" MarkerSize="1">
6 </asp:Series>
7 </Series>
8 <ChartAreas>
9 <asp:ChartArea Name="ChartArea1">
10 <AxisY LineColor="Gainsboro">
11 <MajorGrid LineColor="Gainsboro" LineDashStyle="Dot" />
12 </AxisY>
13 <AxisX Interval="1" IntervalType="Days" LineColor="Gainsboro">
14 <MajorGrid LineColor="Gainsboro" LineDashStyle="Dot" />
15 <LabelStyle Format="MM-dd" />
16 </AxisX>
17 </asp:ChartArea>
18 </ChartAreas>
19 </asp:Chart>
1 protected void GetFiveDaysChart(string StockCode)//StockCode传递的是股票代码
2 {
3 double minClosePrice = StockChart.GetMinClosePriceByCode(StockCode);//取出该股票代码最低的收盘价
4 DataTable dt = StockChart.GetStockForFiveDays(StockCode);//根据该股票代码取出5天内的股票数据
5 Chart2.DataSource = dt;
6 Chart2.Series["Series1"].XValueMember = "UpdateTime";//股票数据更新时间
7 Chart2.Series["Series1"].YValueMembers = "HighestPrice,LowestPrice,OpenPrice,ClosePrice";//最高价,最低价,开盘价,收盘价
8 Chart2.ChartAreas[0].AxisY.Minimum = minClosePrice - (minClosePrice % 10 / 2);
9 Chart2.DataBind();
10 }
本人的QQ:380472335
热烈欢迎高手指点,是第一次在博客园提问!
还是没有从根本上解决问题...