Hi steema support,
I have a bar chart based on data
.
x axis- 0.0 , 0.4 , 0.9, 0.13 ,0.17 ,0.22, 0.26, 0.30, 0.35, 0.39
Y-Axis- 0.01, 0.78, 0.15, 0.04, 0.01, 0,0,0,0,0
In this i have facing overlap and gap issue. Please look this.
code-
SeriesPlotBar = new Bar(tChartGraph.Chart);
SeriesPlotBar.Color = BarAreaLightRed;
SeriesPlotBar.Marks.Visible = false;
SeriesPlotBar.StackGroup = 0;
SeriesPlotBar.BarWidthPercent = 100;
After setting barwidth percentage issue not resolved.
Rest we have soon provide data for our previous posts.
Thanks
Plano research
Regarding Bar chart
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Regarding Bar chart
Hello,
Using the latest version of TeeChart.dll and the following code:
I obtain the following before the button click:
and after the click I obtain:
in this test both CustomBarWidth and BarWidthPercent work as expected. Which version of TeeChart.dll are you using?
Using the latest version of TeeChart.dll and the following code:
Code: Select all
Bar series;
private void InitializeChart()
{
double[] xvalues = new double[] { 0.0, 0.4, 0.9, 0.13, 0.17, 0.22, 0.26, 0.30, 0.35, 0.39 };
double[] yvalues = new double[] { 0.01, 0.78, 0.15, 0.04, 0.01, 0, 0, 0, 0, 0 };
series = new Bar(tChart1.Chart);
series.Add(xvalues, yvalues);
series.Marks.Visible = false;
tChart1.Axes.Bottom.SetMinMax(0, 0.5);
tChart1.Axes.Left.SetMinMax(0, 0.2);
}
private void button2_Click(object sender, EventArgs e)
{
series.CustomBarWidth = 30;
//series.BarWidthPercent = 20;
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Regarding Bar chart
I would like to share that we can not fix the width of bars and my expectation is to combine the bars without gap and without overlap.
I am giving 2 more dataset.
Ist Dataset
X- 0.06,0.18,0.13,0.41,0.53,0.64,0.76,0.87,0.9,1.11
Y- 0.01,0.04,0.09,0.16,0.20,0.19,0.16,0.09,.0.05,.0.0
And the chart image is as below, in this case overlapping is coming. I am using silverlight.
IINd Dataset-
X- 0.0, 0.04 ,0.09 ,0.13 ,0.17 ,0.22 ,0.26 ,0.30 ,0.35 ,0.39
Y- 0.01, 0.78, 0.15 , 0.04, 0.01, 0, 0, 0, 0, 0
In This gap is coming-
Please provide dome fruitful solution. In Excel we are able to plot expected. And i am using percentage 100%.
Thanks
Plano
I am giving 2 more dataset.
Ist Dataset
X- 0.06,0.18,0.13,0.41,0.53,0.64,0.76,0.87,0.9,1.11
Y- 0.01,0.04,0.09,0.16,0.20,0.19,0.16,0.09,.0.05,.0.0
And the chart image is as below, in this case overlapping is coming. I am using silverlight.
IINd Dataset-
X- 0.0, 0.04 ,0.09 ,0.13 ,0.17 ,0.22 ,0.26 ,0.30 ,0.35 ,0.39
Y- 0.01, 0.78, 0.15 , 0.04, 0.01, 0, 0, 0, 0, 0
In This gap is coming-
Please provide dome fruitful solution. In Excel we are able to plot expected. And i am using percentage 100%.
Thanks
Plano
- Attachments
-
- 2.png (10.41 KiB) Viewed 13068 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Regarding Bar chart
Hello,
TeeChart has no facility for allowing the Bar series to draw bars of different widths. If you want bars of different widths you can use the Histogram series, e.g.
which gives me:
TeeChart has no facility for allowing the Bar series to draw bars of different widths. If you want bars of different widths you can use the Histogram series, e.g.
Code: Select all
Histogram series;
private void InitializeChart()
{
double[] xvalues = new double[] { 0.0, 0.4, 0.9, 0.13, 0.17, 0.22, 0.26, 0.30, 0.35, 0.39 };
double[] yvalues = new double[] { 0.01, 0.78, 0.15, 0.04, 0.01, 0, 0, 0, 0, 0 };
series = new Histogram(tChart1.Chart);
series.XValues.Order = ValueListOrder.Ascending;
series.Add(xvalues, yvalues);
series.Marks.Visible = false;
series.XValues.Sort();
tChart1.Axes.Bottom.SetMinMax(0, 0.9);
tChart1.Axes.Left.SetMinMax(-1, 0.8);
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |