本文介绍了DEVX Web图表控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用DEVX Webchart控件..
绑定x轴值:
i am using DEVX Webchart control..
Bind x-Axis values:
<dxchartsui:WebChartControl ID="ChartOPCGraph"
runat="server"
Height="400px" Width="700px"
ClientInstanceName="ChartOPCGraph"
DiagramTypeName="XYDiagram">
<Diagram>
<axisy>
<gridlines visible="False"></gridlines>
</axisy>
</Diagram>
<Titles>
<cc1:ChartTitle Dock="Bottom"
Font="Tahoma, 8pt" Text="Days"
TextColor="Gray"
Alignment="Center">
</cc1:ChartTitle>
<cc1:ChartTitle Dock="Left"
Font="Tahoma, 8pt" Text="% Payment made"
TextColor="Gray"
Alignment="Center">
</cc1:ChartTitle>
</Titles>
</dxchartsui:WebChartControl>
正在从数据库填充值.
在x轴上,只有两个数字来自数据库,因此我只需要绑定这两个值,其余的就不可见.
例如我从数据库中得到9个数字,它绑定8.6、8.7、8.8、8.9、9、9.2,......
我正在使用以下图表进行绑定:
values are being populated from database.
On x-axis only two number comes from database so i need to bind only these two values and rest of them must not be visible.
For example i get 9 number from database and it binds 8.6,8.7,8.8,8.9,9,9.2,......
i am binding chart using:
ChartOPCGraph.DataSource = dsClaim.Tables[0];
ChartOPCGraph.SeriesDataMember = dsClaim.Tables[0].Columns["per"].ToString();
ChartOPCGraph.SeriesTemplate.ArgumentScaleType = ScaleType.Numerical;
ChartOPCGraph.SeriesTemplate.ArgumentDataMember = dsClaim.Tables[0].Columns["paymentDays"].ToString();
ChartOPCGraph.SeriesTemplate.ValueDataMembers.AddRange(new string[] { dsClaim.Tables[0].Columns["per"].ToString() });
string paletteName = "MyPalette";
PaletteEntry entry1 = new PaletteEntry(Color.Green, Color.LightGreen);
Palette palette = new Palette(paletteName, new PaletteEntry[] { entry1 });
ChartOPCGraph.PaletteRepository.Add(paletteName, palette);
ChartOPCGraph.PaletteName = paletteName;
SideBySideBarSeriesView objWidth = new SideBySideBarSeriesView();
objWidth.BarWidth = 0.3;
ChartOPCGraph.SeriesTemplate.View = objWidth;
ChartOPCGraph.DataBind();
需要快速回复..
Need a quick reply..
推荐答案
ChartOPCGraph.SeriesTemplate.ArgumentScaleType = ScaleType.Qualitative;
这篇关于DEVX Web图表控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!