当前位置:首页教育技巧excel技巧excel表格单元

excel图表网格线如何取消

减小字体 增大字体 2025-01-13 09:32:57


1.MPAndroidChart的设置如何去掉图表上的网格

哈哈已经搞定;给大家看看 //是否启用网格背景 mChart。

setDrawGridBackground(false); //是否设置Y轴坐标 mChart。 setDrawYLabels(false); //设置网格竖线是否显示 mChart。

setDrawVerticalGrid(false); // 设置在Y轴上是否是从0开始显示 mChart。 setStartAtZero(false); //是否在Y轴显示数据,就是曲线上的数据 mChart。

setDrawYValues(true); //设置网格 mChart。 setDrawBorder(false); mChart。

setBorderPositions(new BarLineChartBase。BorderPosition[]{ BarLineChartBase。

BorderPosition。BOTTOM}); //在chart上的右下角加描述 //mChart。

setDescription("曲线图"); //设置Y轴上的单位 mChart。 setUnit(""); //设置透明度 mChart。

setAlpha(0。8f); //设置网格底下的那条线的颜色 mChart。

setBorderColor(Color。rgb(213, 216, 214)); //设置Y轴前后倒置 mChart。

setInvertYAxisEnabled(false); //设置高亮显示 mChart。 setHighlightEnabled(true); //设置是否可以触摸,如为false,则不能拖动,缩放等 mChart。

setTouchEnabled(true); //设置是否可以拖拽,缩放 mChart。 setDragEnabled(true); mChart。

setScaleEnabled(true); //设置是否能扩大扩小 mChart。 setPinchZoom(true); // 设置背景颜色 mChart。

setBackgroundResource(R。mipmap。

mpandroidchart_bc); //设置点击chart图对应的数据弹出标注 //MyMarkerView mv = new MyMarkerView(this, R。 layout。

custom_marker_view); // define an offset to change the original position of the marker // (optional) //定义一个偏移量来改变标记的原始位置 //mv。 setOffsets(-mv。

getMeasuredWidth() / 2, -mv。getMeasuredHeight()); // set the marker to the chart //设置标记图 //mChart。

setMarkerView(mv); // enable/disable highlight indicators (the lines that indicate the // highlighted Entry) //启用/禁用突出指标(表明行突出显示的条目) mChart。 (false); XLabels xl = mChart。

getXLabels(); // xl。(true); // xl。

setAdjustXLabels(true); xl。setPosition(XLabels。

XLabelPosition。BOTTOM); // 设置X轴的数据在底部显示 xl。

setTextSize(10f); // 设置字体大小 xl。setSpaceBetweenLabels(3); // 设置数据之间的间距 YLabels yl = mChart。

getYLabels(); // yl。setPosition(YLabelPosition。

LEFT_INSIDE); // set the position yl。setTextSize(10f); // s设置字体大小 yl。

setLabelCount(5); // 设置Y轴最多显示的数据个数 // 加载数据 setData(); //从X轴进入的动画 mChart。animateX(2000); mChart。

animateY(2000); //从Y轴进入的动画 mChart。 animateXY(2000, 2000); //从XY轴一起进入的动画 //设置最小的缩放 mChart。

setScaleMinima(0。5f, 1f); //设置视口 // mChart。

centerViewPort(10, 50); // get the legend (only possible after setting data) //后得到图例(唯一可能设置数据) Legend l = mChart。 getLegend(); l。

setForm(Legend。LegendForm。

LINE); //设置图最下面显示的类型 l。setTextSize(15); l。

setTextColor(Color。rgb(104, 241, 175)); l。

setFormSize(30f); // set the size of the legend forms/shapes 图例形式/形状的大小 // 刷新图表 mChart。invalidate(); set1。

setDrawCubic(true); //设置曲线为圆滑的线 set1。setCubicIntensity(0。

2f); set1。setDrawFilled(false); //设置包括的范围区域填充颜色 set1。

setDrawCircles(true); //设置有圆点 set1。setLineWidth(2f); //设置线的宽度 set1。

setCircleSize(5f); //设置小圆的大小 set1。setHighLightColor(Color。

rgb(244, 117, 117)); set1。setColor(Color。

rgb(104, 241, 175)); //设置曲线的颜色 // create a data object with the datasets LineData data = new LineData(xVals, set1);。

评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分)

【免责声明】本站信息来自网友投稿及网络整理,内容仅供参考,如果有错误请反馈给我们及时更正,对文中内容的真实性和完整性本站不提供任何保证,不承但任何责任。
版权所有:学窍知识网 Copyright © 2011-2025 www.at317.com All Rights Reserved .