AnyChart-Android icon indicating copy to clipboard operation
AnyChart-Android copied to clipboard

How i can remove point from linearGauge chart

Open umerharris opened this issue 4 years ago • 3 comments

How can remove pointer from the chart?

Screenshot_20211209_181508

umerharris avatar Dec 09 '21 13:12 umerharris

@umerharris Please, can you provide the chart configuration code?

Shestac92 avatar Dec 10 '21 03:12 Shestac92

holder.linearGauge = AnyChart.linear(); holder.linearGauge.data(new SingleValueDataSet(new Double[]{data})); holder.linearGauge.layout(Layout.HORIZONTAL);

            holder.linearGauge.credits().enabled(false);
            holder.linearGauge.tooltip(false);
            holder.linearGauge.interactivity().selectionMode(SelectionMode.NONE);

            holder.linearGauge.scaleBar(0)
                    .width("10%")
                    .from(min)
                    .to(minNorm)
                    .fill("#2a91f1");

            holder.linearGauge.scaleBar(1)
                    .width("10%")
                    .from(minNorm)
                    .to(maxNorm)
                    .fill("#4fe61e");

            holder.linearGauge.scaleBar(2)
                    .width("10%")
                    .from(maxNorm)
                    .to(max)
                    .fill("#2a91f1");

            holder.linearGauge.marker(0)
                    .type(MarkerType.TRIANGLE_DOWN)
                    .hatchFill(false)
                    .color(markerColor)
                    .width("15%")
                    .offset("-17.0%")
                    .zIndex(10);

            holder.linearGauge.marker(0).labels()
                    .enabled(true)
                    .fontColor(markerColor)
                    .width("20%")
                    .offsetX(24)
                    .offsetY(-30);

            holder.linearGauge.scale()
                    .minimum(min)
                    .maximum(max);

            holder.linearGauge.axis(0)
                    .width("1%")
                    .offset("10%")
                    .scale(holder.linearGauge.scale())
                    .orientation(Orientation.BOTTOM)
                    .labels("bottom");

            holder.linearGauge.padding(0, 20, 0, 20);
            if(holder.anyChartView.getTag().equals("false")){
                holder.anyChartView.setChart(holder.linearGauge);
            }
            holder.anyChartView.setOnRenderedListener(new AnyChartView.OnRenderedListener() {
                @Override
                public void onRendered() {
                    holder.anyChartView.setTag("true");
                    holder.linearGauge.autoRedraw();
                }
            });

umerharris avatar Dec 10 '21 10:12 umerharris

@umerharris Unfortunately, it is a bug in the Android version of the library. This marker comes along with the label. If you disable the label it disappears too.

Shestac92 avatar Dec 13 '21 03:12 Shestac92