Git Product home page Git Product logo

scatter-piechart's People

Contributors

intrudershanky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scatter-piechart's Issues

chart issure

hello,Tks the chart,when i use it, the datas is from network, the chart can't work right, then i modify the onMesure() ,please verify the problem.

@OverRide
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
float width = getMeasuredWidth();
float height = getMeasuredHeight();
side = Math.min(width, height);
cx = width / 2;
cy = height / 2;
paint.setColor(centerColor);
}

@Override
public void draw(Canvas canvas) {
    super.draw(canvas);
    if (CollectionUtils.isEmpty(chartUtils)) {
        if (chartData != null) {
            if (withPercent) {
                float value = 0;
                int i;
                for (i = 0; i < chartData.size(); i++) {
                    value += chartData.get(i).getPartInPercent();
                    if (value > 100)
                        break;
                }
                if (i < chartData.size()) {
                } else {
                    chartUtils = ChartHelper.generateArcWithPercent(chartData);
                }
            } else {
                chartUtils = ChartHelper.generateArc(chartData);
            }
            alpha = 255 / chartData.size();
            textPaintAbout.setTextSize(textSize);
        }
    }
  ...............

}

text hide when value under 4 percent

issue

                 data1.add(new ChartData("40%", 40, Color.WHITE, Color.parseColor("#33691E")));
                data1.add(new ChartData("40%", 40, Color.WHITE, Color.parseColor("#f42e48")));
                data1.add(new ChartData("18%", 18, Color.WHITE, Color.parseColor("#FFD600")));
                data1.add(new ChartData("2%", 2, Color.WHITE, Color.parseColor("#C3C3C3")));

text gone when last partition is of zero percent

issue-2

data1.add(new ChartData("40%", 40, Color.WHITE, Color.parseColor("#33691E")));
data1.add(new ChartData("40%", 40, Color.WHITE, Color.parseColor("#f42e48")));
data1.add(new ChartData("20%", 20, Color.WHITE, Color.parseColor("#FFD600")));
data1.add(new ChartData("0%", 0, Color.WHITE, Color.parseColor("#C3C3C3")));

Remove a specific chart data backgound color

    data.add(new ChartData("", (float) redPer, Color.WHITE, Color.parseColor("#fe1f20")));

here Color.parseColor("#fe1f20") i want to remove color. means i have no need to identify color it automatically pick color from main layout color.

if any solution please help me

Thank you

Starting Point of The Charth

Hello, starting point of the charth is 90 degrees, how can we start it at 0 degrees (I mean begin it at clock 12 side).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.