Android 我正在使用自由图表处理项目,我无法增加X轴和Y轴的字体

Android 我正在使用自由图表处理项目,我无法增加X轴和Y轴的字体,android,linechart,Android,Linechart,我正在使用afreechart库在我的应用程序中显示不同类型的图形,但我无法在折线图上增加X轴和Y轴上的标签大小,因为它不涉及更改…我无法使标签文本的大小增加 我的密码在这里 package com.chartingapp.chartview; 导入org.achartengine.GraphicalView; 导入org.afree.chart.AFreeChart; 导入org.afree.chart.ChartFactory; 导入org.afree.chart.LegendItemCo

我正在使用afreechart库在我的应用程序中显示不同类型的图形,但我无法在折线图上增加X轴和Y轴上的标签大小,因为它不涉及更改…我无法使标签文本的大小增加 我的密码在这里

package com.chartingapp.chartview;
导入org.achartengine.GraphicalView;
导入org.afree.chart.AFreeChart;
导入org.afree.chart.ChartFactory;
导入org.afree.chart.LegendItemCollection;
导入org.afree.chart.axis.CategoryAxis;
导入org.afree.chart.axis.CategoryLabelPositions;
导入org.afree.chart.labels.CategoryItemLabelGenerator;
导入org.afree.chart.plot.CategoryPlot;
导入org.afree.chart.plot.PlotOrientation;
导入org.afree.chart.renderer.category.LineAndShapeRenderer;
导入org.afree.chart.title.TextTitle;
导入org.afree.data.category.CategoryDataset;
导入org.afree.data.category.DefaultCategoryDataset;
导入org.afree.graphics.SolidColor;
导入org.afree.ui.rectangleInserts;
导入android.content.Context;
导入android.graphics.Color;
导入android.util.AttributeSet;
导入com.chartingapp.ChartView;
导入com.chartingapp.R.color;
导入com.chartingapp.util.CommonUtil;
公共类LineChartView 1扩展了ChartView{
私有图形视图;
私有静态文本标题;
私有静态LegendItemCollection项;
public CommonUtil m_Inst=CommonUtil.getInstance();
私有静态浮点textSize=30;
公共LineChartView1(上下文、属性集属性){
超级(上下文,attrs);
最终AFreeChart图表=createChart1(createDataset1());
setChart(图表);
}
/*****************************开始*********************************/
私有静态AFreeChart createChart1(CategoryDataset数据集){
AFreeChart chart1=ChartFactory.createLineChart(CommonUtil.repName,
“”、“值”、数据集、PlotOrientation.VERTICAL、true、true、,
假);
图1.setBackgroundPaintType(新SolidColor(Color.WHITE));
final CategoryPlot plot=chart1.getCategoryPlot();
plot.setBackgroundPaintType(新SolidColor(Color.WHITE));
plot.setDomainGridlinePaintType(新的SolidColor(Color.BLACK));
plot.setRangeGridlinePaintType(新的SolidColor(Color.BLACK));
plot.setAxisOffset(新的矩形插图(5.0,5.0,5.0,5.0));
plot.setDomainCrosshairVisible(true);
plot.setRangeCrosshairVisible(真);
LineandShaperEnder渲染器=新的LineandShaperEnder();
renderer.setSeriessShapesVisible(dataset.getRowCount(),true);
renderer.setBaseItemLabelsVisible(true);
对于(int i=0;iCommonUtil.dataList.size()){
对于(int i=0;i
我猜您使用的是achartengine(来自您的导入),因此您可以更改文本大小:

renderer.setLabelsTextSize(size);
renderer.setLegendHeight(height);
它更灵活