我需要删除正确的传说BarChart.
这是我的代码.
mChart = (BarChart) rootView.findViewById(R.id.chart1);
mChart.setOnChartValueSelectedListener(this);
mChart.setDrawBarShadow(false);
mChart.setDrawValueAboveBar(true);
mChart.setDescription("");
mChart.setMaxVisibleValueCount(60);
mChart.setPinchZoom(false);
mChart.setDrawGridBackground(false);
mTf = Typeface.createFromAsset(getActivity().getAssets(), "OpenSans-Regular.ttf");
XAxis xAxis = mChart.getXAxis();
xAxis.setPosition(XAxisPosition.BOTTOM);
xAxis.setTypeface(mTf);
xAxis.setDrawGridLines(false);
xAxis.setSpaceBetweenLabels(2);
ValueFormatter custom = new MyValueFormatter();
YAxis leftAxis = mChart.getAxisLeft();
leftAxis.setTypeface(mTf);
leftAxis.setLabelCount(8);
leftAxis.setValueFormatter(custom);
leftAxis.setPosition(YAxisLabelPosition.OUTSIDE_CHART);
leftAxis.setSpaceTop(15f);
Legend l = mChart.getLegend();
l.setPosition(LegendPosition.BELOW_CHART_LEFT);
l.setForm(LegendForm.SQUARE);
l.setFormSize(9f);
l.setTextSize(11f);
l.setXEntrySpace(4f);
mChart.animateXY(3000, 3000);
Run Code Online (Sandbox Code Playgroud)

谢谢!
当调用animateY一个在barChart整个图表重画,动画从Y型零杆为Y-新.
barChart.invalidate();
barChart.animateY(1000);
Run Code Online (Sandbox Code Playgroud)
是否可以将动画限制为值更改.从而允许用户看到图表如何从y-old(例如100)增长到y-new(例如120)?
我使用MPAndroidChart RadarChart.
我想减少图体和数据描述之间的空间.(见下图.)

我应该使用哪种MPAndroidChart方法?
如何控制MPAndroidChart饼图中的每个切片的单击?我知道我们可以控制单击饼图,但是我想单击图的切片并查找单击了哪个切片?
我可以在图片中画一个lineChart吗?如果可以,我该怎么做才能改变线条颜色?谢谢!
我绘制的内容看起来像图片二,这条线是相同的颜色,没有昨天的颜色.我应该怎么做才能将线条变成渐变颜色,只显示最后一个标记视图?
我想在选择一个值时显示带有特定数据的标签,如我想要的演示图像中所示:

所以我粘贴此代码(在示例的源代码中找到):
protected RectF mOnValueSelectedRectF = new RectF();
@Override
public void onValueSelected(Entry e, Highlight h) {
if (e == null)
return;
RectF bounds = mOnValueSelectedRectF;
mChart.getBarBounds((BarEntry) e, bounds);
MPPointF position = mChart.getPosition(e, AxisDependency.LEFT);
Log.i("bounds", bounds.toString());
Log.i("position", position.toString());
Log.i("x-index",
"low: " + mChart.getLowestVisibleX() + ", high: "
+ mChart.getHighestVisibleX());
MPPointF.recycleInstance(position);
}
Run Code Online (Sandbox Code Playgroud)
但它不起作用,显示日志但屏幕上没有任何反应。我忘记或错过了什么
我正在使用MPAndroid库在Android应用程序中显示一个简单的条形图。条形图有时会完美显示数据。但是,有时即使数据集包含数据,它也会显示消息“没有可用的图表数据”。
仅当我点击“图表”区域时,才会显示该图表。我用谷歌搜索,但是找不到解决方案。以下是代码:
if (mCount > 0){mBarDataSet = new BarDataSet(mBarEntryAssessmentList, "Assessment Count");
mBarDataSet.setBarSpacePercent(5f);
mBarData = new BarData(trimmedSubjectNameList, mBarDataSet);
mBarData.setValueFormatter(new BarEntryValueFormatter()); // Setting a Value formatter to show Integer data instead of Float
mBarChart.setData(mBarData);
mBarChart.setDescription("");
mBarChart.setDrawGridBackground(false);
mBarChart.setDragEnabled(true);
mBarChart.setTouchEnabled(true);
mBarChart.setClickable(true);
mBarChart.setScaleXEnabled(false);
mBarChart.setScaleYEnabled(false);
mBarChart.setVisibleXRange(1, 4);
mBarChart.setHighlightPerDragEnabled(false);
mBarChart.setHighlightPerTapEnabled(true); // set this to true if we want to listen to click events
mBarChart.setOnChartValueSelectedListener(StudentProgressActivity.this);
XAxis xAxis = mBarChart.getXAxis();
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
xAxis.setDrawLabels(true);
xAxis.setDrawGridLines(false);
xAxis.setLabelsToSkip(0); // Shows all the labels as initially we had problems showing all the labels
YAxis …Run Code Online (Sandbox Code Playgroud) 如何获取Webview中当前打开的页面的URL?
实际上,我想创建一个登录方案。这样我就可以整合我的大学网站,以便实时通知作业和测验。
提前致谢