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>
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..