This question is locked. New answers and comments are not allowed.
Hi,
I am a experimenting your tool with windows phone 7.1.
Sorry about too many questions below,
(a) I would like to know how can i remove gaps between bars,
I am trying to display each day of month and the amount for the day; hence the space between bars is a lost asset for me. please help.
(b) How can I show the axis labels on top of the chart instead of bottom?
I plan to use only portrait layout.
(c) Can I disable labels altogether and just use trackball (I haven't experimented with it yet) to show labels (for both x and y axis) or details?
Code is similar to your documentation:
<chart:RadCartesianChart x:Name="chart">
<chart:RadCartesianChart.HorizontalAxis>
<chart:DateTimeCategoricalAxis LabelFitMode="MultiLine"
LabelFormat="dd"
DateTimeComponent="Day"/>
</chart:RadCartesianChart.HorizontalAxis>
<chart:RadCartesianChart.VerticalAxis>
<chart:LinearAxis/>
</chart:RadCartesianChart.VerticalAxis>
<chart:RadCartesianChart.Series>
<chart:BarSeries/>
<chart:BarSeries/>
</chart:RadCartesianChart.Series>
</chart:RadCartesianChart>
DateTime lastDate = DateTime.Now;
int monthnum = DateTime.Now.Month;
double lastVal = 20;
List<ChartDataObject> dataSouce = new List<ChartDataObject>();
for (int i = 0; lastDate.Month == monthnum; ++i)
{
ChartDataObject obj = new ChartDataObject
{
Date =lastDate.Day,
Value = lastVal++
};
dataSouce.Add(obj);
lastDate = lastDate.AddDays(1);
}
BarSeries series = (BarSeries)this.chart.Series[0];
series.CategoryBinding = new PropertyNameDataPointBinding()
{
PropertyName =
"Date"
};
series.ValueBinding = new PropertyNameDataPointBinding()
{
PropertyName =
"Value"
};
series.ItemsSource = dataSouce;
series.CombineMode.Equals("Stack");
I am a experimenting your tool with windows phone 7.1.
Sorry about too many questions below,
(a) I would like to know how can i remove gaps between bars,
I am trying to display each day of month and the amount for the day; hence the space between bars is a lost asset for me. please help.
(b) How can I show the axis labels on top of the chart instead of bottom?
I plan to use only portrait layout.
(c) Can I disable labels altogether and just use trackball (I haven't experimented with it yet) to show labels (for both x and y axis) or details?
Code is similar to your documentation:
<chart:RadCartesianChart x:Name="chart">
<chart:RadCartesianChart.HorizontalAxis>
<chart:DateTimeCategoricalAxis LabelFitMode="MultiLine"
LabelFormat="dd"
DateTimeComponent="Day"/>
</chart:RadCartesianChart.HorizontalAxis>
<chart:RadCartesianChart.VerticalAxis>
<chart:LinearAxis/>
</chart:RadCartesianChart.VerticalAxis>
<chart:RadCartesianChart.Series>
<chart:BarSeries/>
<chart:BarSeries/>
</chart:RadCartesianChart.Series>
</chart:RadCartesianChart>
DateTime lastDate = DateTime.Now;
int monthnum = DateTime.Now.Month;
double lastVal = 20;
List<ChartDataObject> dataSouce = new List<ChartDataObject>();
for (int i = 0; lastDate.Month == monthnum; ++i)
{
ChartDataObject obj = new ChartDataObject
{
Date =lastDate.Day,
Value = lastVal++
};
dataSouce.Add(obj);
lastDate = lastDate.AddDays(1);
}
BarSeries series = (BarSeries)this.chart.Series[0];
series.CategoryBinding = new PropertyNameDataPointBinding()
{
PropertyName =
"Date"
};
series.ValueBinding = new PropertyNameDataPointBinding()
{
PropertyName =
"Value"
};
series.ItemsSource = dataSouce;
series.CombineMode.Equals("Stack");
/* lastDate = DateTime.Now;
lastVal = 40;
List<ChartDataObject> dataSouce2 = new List<ChartDataObject>();
for (int i = 0; lastDate.Month == monthnum; ++i)
{
ChartDataObject obj = new ChartDataObject
{
Date = lastDate.Day,
Value = lastVal++
};
dataSouce2.Add(obj);
lastDate = lastDate.AddDays(1);
}
*/
lastVal = 40;
List<ChartDataObject> dataSouce2 = new List<ChartDataObject>();
for (int i = 0; lastDate.Month == monthnum; ++i)
{
ChartDataObject obj = new ChartDataObject
{
Date = lastDate.Day,
Value = lastVal++
};
dataSouce2.Add(obj);
lastDate = lastDate.AddDays(1);
}
*/
/* BarSeries series2 = (BarSeries)this.chart.Series[1];
series2.CategoryBinding = new PropertyNameDataPointBinding()
{
PropertyName =
"Date"
};
series2.ValueBinding = new PropertyNameDataPointBinding()
{
PropertyName =
"Value"
};
series2.ItemsSource = dataSouce2;
series2.CombineMode.Equals("Stack");
*/
series2.CategoryBinding = new PropertyNameDataPointBinding()
{
PropertyName =
"Date"
};
series2.ValueBinding = new PropertyNameDataPointBinding()
{
PropertyName =
"Value"
};
series2.ItemsSource = dataSouce2;
series2.CombineMode.Equals("Stack");
*/