关于TDBChart柱状图的显示问题
DBChart1是TDBChart,我的柱状图每个柱子下面会多出一点空白,不知道是哪里出了问题,麻烦帮忙看下,谢谢了
DBChart1->LeftAxis->Automatic = true;
DBChart1->RightAxis->Automatic = true;
DBChart1->TopAxis->Automatic = true;
DBChart1->BottomAxis->Automatic = true;
DBChart1->BackWall->Brush->Style = bsClear;
TChartSeries *ChartSeries;
if (type == 1) //饼状图
{
ChartSeries = new TPieSeries(Owner);
}else if(type == 2)
{
ChartSeries = new TBarSeries(Owner);//柱状图
}
ChartSeries->Title = " ";
ChartSeries->Marks->Font->Size = 15;
ChartSeries->Marks->Style = TSeriesMarksStyle(3);
ChartSeries->Active = false ;
DBChart1->AddSeries(ChartSeries);
//绑定数据源
ChartSeries->DataSource = ClientDataSet1;
ChartSeries->XLabelsSource = ClientDataSet1PSName->FieldName;
//绑定y轴数据与数据源的字段"GetVoteNumbers"
ChartSeries->YValues->ValueSource = ClientDataSet1GetVoteNumbers->FieldName;
ChartSeries->ColorEachPoint = true;
DBChart1->BottomAxis->LabelStyle = talText;
ChartSeries->Active = true ;