当前位置: 首页>>代码示例>>Java>>正文


Java Point类代码示例

本文整理汇总了Java中com.googlecode.wickedcharts.highcharts.options.series.Point的典型用法代码示例。如果您正苦于以下问题:Java Point类的具体用法?Java Point怎么用?Java Point使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Point类属于com.googlecode.wickedcharts.highcharts.options.series包,在下文中一共展示了Point类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepareEventSeries

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
/**
 * prepare data for diagram by calculating percentages of events by
 * eventtype
 *
 * @return data series for pie chart
 */
private Series<Point> prepareEventSeries() {
	final Series<Point> series = new PointSeries().setType(SeriesType.PIE).setName("Event Types Percentage");

	// get overall number of events
	final double numberOfEvents = EapEvent.getNumberOfEvents();

	for (final EapEventType type : EapEventType.findAll()) {
		final double numberOfEventsOfEventType = EapEvent.getNumberOfEventsByEventType(type);
		double percentage = 0;
		if (numberOfEvents > 0) {
			// calculate percentage
			percentage = numberOfEventsOfEventType / numberOfEvents;
		}
		series.addPoint(new Point(type.getTypeName(), Math.round(percentage * 100) / 100.0));
	}
	return series;
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:24,代码来源:EventTypePercentageDiagramm.java

示例2: getTrafficLightOptions

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
private Options getTrafficLightOptions(){
	Options options = new Options();
	if(lastBuildSuccess != null){
	    HexColor color = getTrafficLightColor(lastBuildSuccess.getValue());
	
   		options.setChartOptions(new ChartOptions()
   	        .setPlotBackgroundColor(new NullColor())
   	        .setPlotBorderWidth(null)
   	        .setHeight(250)
   	        .setPlotShadow(Boolean.FALSE));
   		options.setTitle(new Title("Latest Build Status"));
   		options.setSubtitle(new Title(projectName));
   		
   		options.setPlotOptions(new PlotOptionsChoice()
   	        .setPie(new PlotOptions()
   	            .setAllowPointSelect(Boolean.FALSE)
   	            .setBorderWidth(0) // to make it look like a "traffic light"
   	            .setCursor(Cursor.POINTER)));
    
   		options.addSeries(new PointSeries()
   	        .setType(SeriesType.PIE)
   	        .addPoint(new Point(lastBuildSuccess.getValue(), 100).setColor(color)));
	}
	return options;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:26,代码来源:JenkinsWidgetView.java

示例3: getPointWithWickedChartsId

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
/**
 * Retrieves the {@link Point} object with the given wickedChartsId from the
 * given {@link Options} object. Returns null if a Point with the given ID
 * does not exist.
 */
public static Point getPointWithWickedChartsId(final Options options, final int wickedChartsId) {
	for (Series<?> series : options.getSeries()) {
		for (Object object : series.getData()) {
			if (!(object instanceof Point)) {
				break;
			} else {
				Point point = (Point) object;
				if (point.getWickedChartsId() == wickedChartsId) {
					return point;
				}
			}
		}
	}
	return null;
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:21,代码来源:OptionsUtil.java

示例4: respond

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
@Override
protected void respond(final AjaxRequestTarget target) {
	Chart chart = (Chart) getComponent();
	int seriesIndex = OptionsUtil.getSeriesIndex(chart.getOptions(), this.series.getWickedChartsId());
	LiveDataUpdateEvent event = new LiveDataUpdateEvent();
	event.setJavascriptChartName(chart.getJavaScriptVarName());
	event.setParameters(createJavascriptParameters());
	WicketLiveDataUpdateEvent wicketEvent = new WicketLiveDataUpdateEvent(target, event);
	final Point point = this.series.update(wicketEvent);
	if (point != null) {
		JsonRenderer renderer = JsonRendererFactory.getInstance().getRenderer();
		String jsonPoint = renderer.toJson(point);
		String javaScript = "var chartVarName = " + ((Chart) getComponent()).getJavaScriptVarName() + ";\n";
		javaScript += "var seriesIndex = " + seriesIndex + ";\n";
		javaScript += "eval(chartVarName).series[seriesIndex].addPoint(" + jsonPoint + ", true, true);\n";
		target.appendJavaScript(javaScript);
	}
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:19,代码来源:LiveDataAjaxBehavior.java

示例5: respond

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
@Override
protected void respond(final AjaxRequestTarget target) {
	Chart chart = (Chart) getComponent();
	Options options = chart.getOptions();

	InteractionEvent event = new InteractionEvent();
	event.setJavascriptChartName(chart.getJavaScriptVarName());

	StringValue selectedPointValue = getVariableValue(SELECTED_POINT);
	if (selectedPointValue != null && !"".equals(selectedPointValue.toString())) {
		Integer selectedPoint = selectedPointValue.toInteger();
		Point point = OptionsUtil.getPointWithWickedChartsId(options, selectedPoint);
		event.setSelectedPoint(point);
	}

	StringValue selectedSeriesValue = getVariableValue(SELECTED_SERIES);
	if (selectedSeriesValue != null && !"".equals(selectedSeriesValue.toString())) {
		Integer selectedSeries = selectedSeriesValue.toInteger();
		Series<?> series = OptionsUtil.getSeriesWithWickedChartsId(options, selectedSeries);
		event.setSelectedSeries(series);
	}

	event.setSelectedChart(options);

	onEvent(event, target);
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:27,代码来源:InteractionBehavior.java

示例6: randomData

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
private List<Point> randomData(int size, String symbol, Tick[] ticks) {

		List<Point> result = new ArrayList<Point>();

		Collections.reverse(Arrays.asList(ticks));

		for (int i = 0; i < size; i++) {
			result.add(new Point().setX(ticks[i].getTimestamp().getTime())
					.setY(ticks[i].getPrice()));
			// time += 1000;
		}
		return result;
	}
 
开发者ID:sgrotz,项目名称:myopentrader,代码行数:14,代码来源:RealTimeTickChart.java

示例7: getChartOptions

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
/**
 * 
 * @param 
 * @return
 */
public Options getChartOptions(List<SonarMetricMeasurement> metrics ){			
		
		String group;
		if (settings.get("metric") == null) {
			group = "Code Lines related";
		} else {
			group = settings.get("metric");
		}
		
		// get latest
		List<SonarMetricMeasurement> latestMetrics = getLatestMetricDataSet(metrics);
		List<SonarMetricMeasurement> metricGroup = getMetricsForGroup(group, latestMetrics);
	
		Options options = new Options();
		ChartOptions chartOptions =  new ChartOptions();
		SeriesType seriesType = SeriesType.COLUMN; 
		chartOptions.setType(seriesType);    
		Title chartTitle = new Title(title + " of " + group + " Metrics");
		options.setTitle(chartTitle);

		for(SonarMetricMeasurement metric: metricGroup){				
			PointSeries series = new PointSeries();	
			series.setType(seriesType);
			series.addPoint(new Point(metric.getSonarMetric(), new Double(metric.getValue())));
			series.setName(metric.getSonarMetric());
			options.addSeries(series);
		}
		options.setChartOptions(chartOptions);	
		
		return options;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:37,代码来源:SonarQualityWidget.java

示例8: getChartOptionsDifferently

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
public Options getChartOptionsDifferently(List<SonarMetricMeasurement> metrics,String individualMetric) {

        String group;
        if (settings.get("metric") == null) {
            group = "Code Lines related";
        } else {
            group = settings.get("metric");
        }

        // get latest
        //List<SonarMetricMeasurement> latestMetrics = getLatestMetricDataSet(metrics);
       // List<SonarMetricMeasurement> metricGroup = getMetricsForGroup(group, latestMetrics);

        Options options = new Options();
        ChartOptions chartOptions = new ChartOptions();
        SeriesType seriesType = SeriesType.COLUMN;
        chartOptions.setType(seriesType);
        Title chartTitle = new Title(title + " of " + group + " Metrics");
        options.setTitle(chartTitle);

        for (SonarMetricMeasurement metric : metrics) {
            
            if(metric.getSonarMetric().compareToIgnoreCase(individualMetric) == 0){
            PointSeries series = new PointSeries();
            series.setType(seriesType);
            series.addPoint(new Point(metric.getSonarMetric(), new Double(metric.getValue())));
            series.setName(metric.getSonarMetric());
            options.addSeries(series);
            }
        }
        options.setChartOptions(chartOptions);

        return options;
    }
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:35,代码来源:SonarQualityWidget.java

示例9: HomePage

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
public HomePage(final PageParameters parameters) {
    super(parameters, "Home", PageType.HOME);

    // create the players analyzed chart on the landing page
    Options playerOptions = new Options();
    playerOptions.setTooltip(new Tooltip());
    playerOptions.setTitle(new Title("Players analyzed"));

    // make chart a pie chart with a height of 800
    playerOptions.setChartOptions(new ChartOptions().setType(SeriesType.PIE).setHeight(800));

    // disable shadows for the chart
    playerOptions.setPlotOptions(new PlotOptionsChoice().setPie(new PlotOptions().setShadow(false)));

    // create data points for regions
    PointSeries regionSeries = new PointSeries();
    // iterate over all summoner counts and create points accordingly
    // then add all points to the series
    PageDataProvider.overallSummonerStatisticItem.getSummonerCounts().entrySet().stream()
            .map(e -> new Point(e.getKey(), e.getValue()).setId(e.getKey())).forEach(regionSeries::addPoint);
    // set title and size of pie chart
    regionSeries.setName("Players");
    regionSeries.setSize(new PixelOrPercent(80, PixelOrPercent.Unit.PERCENT));
    // position labels and disable their shadows
    regionSeries.setDataLabels(new DataLabels().setDistance(-30).setShadow(false));
    // add series to chart
    playerOptions.addSeries(regionSeries);

    // create data points for tiers
    PointSeries tierSeries = new PointSeries();
    // iterate over all tier counts and create points accordingly
    PageDataProvider.overallSummonerStatisticItem.getTierCounts().entrySet().stream()
            // iterate over all regions and get their tier counts in on stream
            .flatMap(e -> e.getValue().entrySet().stream()
                    // sort points by tier name within a region
                    .sorted((e1, e2) -> TierComparator.staticCompare(e1.getKey(), e2.getKey()))
                    // create a point stream using [region name]-[tier name] as labels and the player counts as values
                    .map(i -> {
                        Point point =  new Point(e.getKey() + "-" + RankedTier.getTierByName(i.getKey()).name(),
                                i.getValue(), RankedTier.getTierByName(i.getKey()).getColor());
                        // use region color for label texts
                        point.setDataLabels(new DataLabels().setShadow(false).setFormatter(new Function(
                                "return '<span style=\"color:' + this.series.chart.get('" + e.getKey() +
                                        "').color + '\">' + this.point.name + '</span>'")));
                        return point;
                    }))
            // add all points to the series
            .forEach(tierSeries::addPoint);
    // set title size of donut chart
    tierSeries.setName("Players");
    tierSeries.setInnerSize(new PixelOrPercent(80, PixelOrPercent.Unit.PERCENT));
    tierSeries.setSize(new PixelOrPercent(100, PixelOrPercent.Unit.PERCENT));
    // disable label shadows
    /* tierSeries.setDataLabels(new DataLabels().setShadow(false).setFormatter(new Function(
            "return '<span style=\"color:' + this.chart.get('').color + '\">' + this.point.name + '</span>"))); */
    // add series to chart
    playerOptions.addSeries(tierSeries);

    // add the chart to the page
    add(new Chart("player_chart", playerOptions));

    // set player count in text
    add(new Label("player_count", NumberFormatter.formatLong(PageDataProvider.overallSummonerStatisticItem
            .getSummonerCounts().values().stream().mapToInt(i -> i).sum())));

    // set update time to the time in the users timezone and show the timezone used
    // set default timezone
    DateTimeZone dateTimeZone = DateTimeZone.UTC;
    // try to get the browsers timezone
    try {
        TimeZone timeZone = ((WebClientInfo) getSession().getClientInfo()).getProperties().getTimeZone();
        if (timeZone != null) dateTimeZone = DateTimeZone.forTimeZone(timeZone);
        else log.info("timeZone is null");
    } catch (Exception ignored) {
        // if anything goes wrong, just stick with UTC as default time zone
    }
    DateTime timeZoneDateTime = new DateTime(MasteryApplication.UPDATE_TIME.toDateTimeToday(), dateTimeZone);

    add(new Label("update_time", String.format("%02d:%02d (%s)", timeZoneDateTime.getHourOfDay(), timeZoneDateTime.
            getMinuteOfHour(), TimeZone.getTimeZone(dateTimeZone.getID()).getDisplayName(Locale.US))));
}
 
开发者ID:LogicalOverflow,项目名称:MasterStats,代码行数:82,代码来源:HomePage.java

示例10: ProjectOptions

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
public ProjectOptions(Project project) {

        ChartOptions chartOptions = new ChartOptions()
                .setPolar(Boolean.TRUE)
                .setType(SeriesType.LINE);

        setChartOptions(chartOptions);
        setTitle(new Title(project.getName()));
        setPane(new Pane().setSize(new PixelOrPercent(90, PixelOrPercent.Unit.PERCENT)));
        setLegend(new Legend(false));
        setCredits(new CreditOptions().setEnabled(false));
        setExporting(new ExportingOptions().setEnabled(false));

        List<String> categories = new ArrayList<>();
        categories.add(project.getOpportunity().getName());
        categories.add(project.getStakeholders().getName());
        categories.add(project.getRequirements().getName());
        categories.add(project.getSoftwareSystem().getName());
        categories.add(project.getWork().getName());
        categories.add(project.getTeam().getName());
        categories.add(project.getWayOfWorking().getName());

        List<Point> points = new ArrayList<>();
        points.add(new Point(project.getOpportunityStatus(), project.getAlphaStateWeight(project.getOpportunity())));
        points.add(new Point(project.getStakeholdersStatus(), project.getAlphaStateWeight(project.getStakeholders())));
        points.add(new Point(project.getRequirementsStatus(), project.getAlphaStateWeight(project.getRequirements())));
        points.add(new Point(project.getSoftwareSystemStatus(), project.getAlphaStateWeight(project.getSoftwareSystem())));
        points.add(new Point(project.getWorkStatus(), project.getAlphaStateWeight(project.getWork())));
        points.add(new Point(project.getTeamStatus(), project.getAlphaStateWeight(project.getTeam())));
        points.add(new Point(project.getWayOfWorkingStatus(), project.getAlphaStateWeight(project.getWayOfWorking())));

        setxAxis(new Axis()
                .setCategories(categories)
                .setTickmarkPlacement(TickmarkPlacement.ON)
                .setLineWidth(0));

        setyAxis(new Axis()
                .setMin(0)
                .setMax(6)
                .setTickInterval(1.0F)
                .setLineWidth(0)
                .setGridLineInterpolation(GridlineInterpolation.POLYGON));

        setTooltip(new Tooltip().setFormatter(new Function().setFunction("return this.point.name;")));

        addSeries(new PointSeries()
                .setData(points)
                .setPointPlacement(PointPlacement.ON)
                .setType(SeriesType.AREA)
                .setName("Alphas"));
    }
 
开发者ID:bibryam,项目名称:semat,代码行数:52,代码来源:ProjectOptions.java

示例11: GraficoTortaClientes

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
public GraficoTortaClientes(Map<Cliente, AtomicInteger> a){
		setChartOptions(new ChartOptions()
        .setPlotBackgroundColor(new NullColor())
        .setPlotBorderWidth(null)
        .setPlotShadow(Boolean.FALSE));
    
    setTitle(new Title("Grafico Tarjetas por Cliente"));
  //*********************************************************************************
    PercentageFormatter formatter = new PercentageFormatter();
    setTooltip(
            new Tooltip()
                .setFormatter(
                        formatter)
                .       setPercentageDecimals(1));
//*********************************************************************************
    setPlotOptions(new PlotOptionsChoice()
        .setPie(new PlotOptions()
        .setAllowPointSelect(Boolean.TRUE)
        .setCursor(Cursor.POINTER)
        .setDataLabels(new DataLabels()
        .setEnabled(Boolean.TRUE)
        .setColor(new HexColor("#000000"))
        .setConnectorColor(new HexColor("#000000"))
        .setFormatter(formatter))));
  //*********************************************************************************
    Series<Point> series = new PointSeries()
        .setType(SeriesType.PIE);
    series.setTooltip(
            new Tooltip().setFormatter(new Function().setFunction(" return ''+ Pepe +': '+ Juan;")));
  //*********************************************************************************
    int i=0;
    for (Map.Entry<Cliente, AtomicInteger> entry : a.entrySet()) {
        series
        .addPoint(
        		//*********************************************************************************
                new Point(entry.getKey().getNombre(), entry.getValue().get()).setColor(
                        new RadialGradient()
                            .setCx(0.5)
                            .setCy(0.3)
                            .setR(0.7)
                                .addStop(0, new HighchartsColor(i))
                                .addStop(1, new HighchartsColor(i).brighten(-0.3f))));
        		//*********************************************************************************
        i++;
    }
    addSeries(series);
	}
 
开发者ID:TesisTarjetasMejorar,项目名称:TarjetasISIS,代码行数:48,代码来源:GraficoTortaClientes.java

示例12: GraficoTortaReportadas

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
public GraficoTortaReportadas(Map<Boolean, AtomicInteger> a){
	setChartOptions(new ChartOptions()
       .setPlotBackgroundColor(new NullColor())
       .setPlotBorderWidth(null)
       .setPlotShadow(Boolean.FALSE));
   
   setTitle(new Title("Grafico Tarjetas Reportadas"));

   PercentageFormatter formatter = new PercentageFormatter();
   setTooltip(
           new Tooltip()
               .setFormatter(
                       formatter)
               .       setPercentageDecimals(1));

   setPlotOptions(new PlotOptionsChoice()
       .setPie(new PlotOptions()
       .setAllowPointSelect(Boolean.TRUE)
       .setCursor(Cursor.POINTER)
       .setDataLabels(new DataLabels()
       .setEnabled(Boolean.TRUE)
       .setColor(new HexColor("#000000"))
       .setConnectorColor(new HexColor("#000000"))
       .setFormatter(formatter))));

   Series<Point> series = new PointSeries()
       .setType(SeriesType.PIE);
   int i=0;
   for (Map.Entry<Boolean, AtomicInteger> entry : a.entrySet()) {
       series
       .addPoint(
               new Point(nombre(entry.getKey()), entry.getValue().get()).setColor(
                       new RadialGradient()
                           .setCx(0.5)
                           .setCy(0.3)
                           .setR(0.7)
                               .addStop(0, new HighchartsColor(i))
                               .addStop(1, new HighchartsColor(i).brighten(-0.3f))));
       i++;
   }
   addSeries(series);
}
 
开发者ID:TesisTarjetasMejorar,项目名称:TarjetasISIS,代码行数:43,代码来源:GraficoTortaReportadas.java

示例13: GraficoTortaEventos

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
public GraficoTortaEventos(Map<Evento, AtomicInteger> a){
	setChartOptions(new ChartOptions()
       .setPlotBackgroundColor(new NullColor())
       .setPlotBorderWidth(null)
       .setPlotShadow(Boolean.FALSE));
   
   setTitle(new Title("Grafico Tarjetas por Eventos"));

   PercentageFormatter formatter = new PercentageFormatter();
   setTooltip(
           new Tooltip()
               .setFormatter(
                       formatter)
               .       setPercentageDecimals(1));

   setPlotOptions(new PlotOptionsChoice()
       .setPie(new PlotOptions()
       .setAllowPointSelect(Boolean.TRUE)
       .setCursor(Cursor.POINTER)
       .setDataLabels(new DataLabels()
       .setEnabled(Boolean.TRUE)
       .setColor(new HexColor("#000000"))
       .setConnectorColor(new HexColor("#000000"))
       .setFormatter(formatter))));

   Series<Point> series = new PointSeries()
       .setType(SeriesType.PIE);
   int i=0;
   for (Map.Entry<Evento, AtomicInteger> entry : a.entrySet()) {
       series
       .addPoint(
               new Point(entry.getKey().getNombre(), entry.getValue().get()).setColor(
                       new RadialGradient()
                           .setCx(0.5)
                           .setCy(0.3)
                           .setR(0.7)
                               .addStop(0, new HighchartsColor(i))
                               .addStop(1, new HighchartsColor(i).brighten(-0.3f))));
       i++;
   }
   addSeries(series);
}
 
开发者ID:TesisTarjetasMejorar,项目名称:TarjetasISIS,代码行数:43,代码来源:GraficoTortaEventos.java

示例14: GraficoTortaBarras

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
public GraficoTortaBarras(Map<String, AtomicInteger> a){

	setChartOptions(new ChartOptions()
       .setPlotBackgroundColor(new NullColor())
       .setPlotBorderWidth(null)
       .setPlotShadow(Boolean.FALSE));
   
   setTitle(new Title("Grafico Tarjetas por Cliente"));

   setSubtitle(new Title("Los meses que no aparecen, es por que no se registran cargas de tarjetas"));
   
   
   PercentageFormatter formatter = new PercentageFormatter();
   setTooltip(
           new Tooltip()
               .setFormatter(
                       formatter)
               .       setPercentageDecimals(1));

   setPlotOptions(new PlotOptionsChoice()
       .setPie(new PlotOptions()
       .setAllowPointSelect(Boolean.TRUE)
       .setCursor(Cursor.POINTER)
       .setDataLabels(new DataLabels()
       .setEnabled(Boolean.TRUE)
       .setColor(new HexColor("#000000"))
       .setConnectorColor(new HexColor("#000000"))
       .setFormatter(formatter))));
   //*********************************************************************************
   Series<Point> series = new PointSeries()
       .setType(SeriesType.COLUMN);
   List<String> titles = new ArrayList<String>();
   

   //*********************************************************************************
 
   int i=0;
   for (Map.Entry<String, AtomicInteger> entry : a.entrySet()) {
       series
       .addPoint(
               new Point(entry.getKey(), entry.getValue().get()).setColor(
                       new RadialGradient()
                           .setCx(0.5)
                           .setCy(0.3)
                           .setR(0.7)
                               .addStop(0, new HighchartsColor(i))
                               .addStop(1, new HighchartsColor(i).brighten(-0.3f))));

       titles.add(""+entry.getKey());
       i++;
   }
   
   this.setxAxis(new Axis().setCategories(titles));



   //*********************************************************************************
   addSeries(series);
}
 
开发者ID:TesisTarjetasMejorar,项目名称:TarjetasISIS,代码行数:60,代码来源:GraficoTortaBarras.java

示例15: GraficoTortaResueltos

import com.googlecode.wickedcharts.highcharts.options.series.Point; //导入依赖的package包/类
public GraficoTortaResueltos(Map<Boolean, AtomicInteger> a){
	setChartOptions(new ChartOptions()
       .setPlotBackgroundColor(new NullColor())
       .setPlotBorderWidth(null)
       .setPlotShadow(Boolean.FALSE));
   
   setTitle(new Title("Grafico Tarjetas Resueltas"));

   PercentageFormatter formatter = new PercentageFormatter();
   setTooltip(
           new Tooltip()
               .setFormatter(
                       formatter)
               .       setPercentageDecimals(1));

   setPlotOptions(new PlotOptionsChoice()
       .setPie(new PlotOptions()
       .setAllowPointSelect(Boolean.TRUE)
       .setCursor(Cursor.POINTER)
       .setDataLabels(new DataLabels()
       .setEnabled(Boolean.TRUE)
       .setColor(new HexColor("#000000"))
       .setConnectorColor(new HexColor("#000000"))
       .setFormatter(formatter))));

   Series<Point> series = new PointSeries()
       .setType(SeriesType.PIE);
   int i=0;
   for (Map.Entry<Boolean, AtomicInteger> entry : a.entrySet()) {
       series
       .addPoint(
               new Point(nombre(entry.getKey()), entry.getValue().get()).setColor(
                       new RadialGradient()
                           .setCx(0.5)
                           .setCy(0.3)
                           .setR(0.7)
                               .addStop(0, new HighchartsColor(i))
                               .addStop(1, new HighchartsColor(i).brighten(-0.3f))));
       i++;
   }
   addSeries(series);
}
 
开发者ID:TesisTarjetasMejorar,项目名称:TarjetasISIS,代码行数:43,代码来源:GraficoTortaResueltos.java


注:本文中的com.googlecode.wickedcharts.highcharts.options.series.Point类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。