Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

FacetChart.setShowValueOnHover(true) changes chart properties on MouseOut

$
0
0
SmartClient Version: v10.0p_2015-01-02/Pro Deployment (built 2015-01-02)

I have a FacetChart with setShowValueOnHover(true), but when I mouse over the values and move the mouse off the chart again it changes the special properties I have set via for example setPieSliceProperties.

I have added before and after pictures of the chart.

TestCase:
Code:

final FacetChart completionChart = new FacetChart();
                completionChart.setWidth(400);
                completionChart.setHeight(400);
                completionChart.setChartRectMargin(10);
                completionChart.setPadding(10);
                completionChart.setBandedBackground(false);
                completionChart.setDataColors("#adc2e5", "#527ebe", "#002f6b", "#88a96e", "#457a56", "#62ba97", "#be1e2d", "#f47d55", "#fcc169", "#be9c6e", "#aeae98");
                completionChart.setBackgroundColor("#FFFFFF");
                completionChart.setShowShadows(false);
                completionChart.setUseAutoGradients(false);
                completionChart.setMinDataSpreadPercent(0);
                completionChart.setShowValueOnHover(true);

                // Disable right-click contextmenu
                this.addShowContextMenuHandler(new ShowContextMenuHandler() {
                        @Override
                        public void onShowContextMenu(ShowContextMenuEvent event) {
                                event.cancel();
                        }
                });
               
                DrawSector pieSlice = new DrawSector();
                pieSlice.setLineColor("#ffffff");
                pieSlice.setLineWidth(10);
                completionChart.setPieSliceProperties(pieSlice);
               
                DrawOval doughnutHole = new DrawOval();
                doughnutHole.setLineOpacity(0);
                doughnutHole.setFillColor("#ffffff");
                completionChart.setDoughnutHoleProperties(doughnutHole);
               
                completionChart.setDoughnutRatio(0.65f);
                completionChart.setDataColors("#62ba97", "#d9d9d9");
                completionChart.setChartRectMargin(0);
                completionChart.setPadding(0);
                completionChart.setWidth(200);
                completionChart.setHeight(200);
                completionChart.setShowLegend(false);
               
                completionChart.setFacets(new Facet("completion", "")); 
                completionChart.setValueProperty("value");
                completionChart.setChartType(ChartType.DOUGHNUT);
               
                Record completed = new Record();
                completed.setAttribute("completion", "Completed");
                completed.setAttribute("value", 75);
               
                Record uncompleted = new Record();
                uncompleted.setAttribute("completion", "Uncompleted");
                uncompleted.setAttribute("value", 25);

                completionChart.setData(new Record[]{completed, uncompleted}); 
               
                completionChart.draw();


Attached Images
File Type: png after_mouse_over.PNG (5.8 KB)
File Type: png before_mouse_over.PNG (5.2 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles