Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:

C#
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..
Posted
Updated 8-May-10 2:16am
v4
Comments
#realJSOP 8-May-10 8:17am    
Dude, you tried three times to correct the formatting and still failed. It's time to use Notepad (or some other editor) to replace the pointy brackets with the proper escape sequence. If you don't take the time to format your question so it's readable, why should we take the time to answer it?

1 solution

Hello,

Just change this line to

ChartOPCGraph.SeriesTemplate.ArgumentScaleType = ScaleType.Qualitative;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900