• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Function类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SplatterChartOptions

import com.googlecode.wickedcharts.highcharts.options.Function; //导入依赖的package包/类
public SplatterChartOptions(final ChartConfiguration configuration) throws Exception {
	this.eventType = configuration.getEventType();
	this.attributeName = configuration.getAttributeName();
	this.title = configuration.getTitle();

	final ChartOptions chartOptions = new ChartOptions();
	chartOptions.setType(SeriesType.SCATTER);
	this.setChartOptions(chartOptions);

	this.setTitle(new Title(this.title));

	// X-Achse
	final Axis xAxis = new Axis();
	xAxis.setType(AxisType.DATETIME);

	final DateTimeLabelFormat dateTimeLabelFormat = new DateTimeLabelFormat().setProperty(DateTimeProperties.DAY, "%e.%m.%Y").setProperty(DateTimeProperties.MONTH, "%m/%Y").setProperty(DateTimeProperties.YEAR, "%Y");

	xAxis.setDateTimeLabelFormats(dateTimeLabelFormat);

	this.setxAxis(xAxis);

	// Y-Achse
	final Axis yAxis = new Axis();
	yAxis.setTitle(new Title(this.attributeName));
	yAxis.setType(AxisType.LINEAR);

	this.setyAxis(yAxis);

	// Tooltip
	final Tooltip tooltip = new Tooltip();
	tooltip.setFormatter(new Function("return '<b>'+ this.series.name +'</b><br/>'+Highcharts.dateFormat('%e.%m.%Y', this.x) +': '+ this.y ;"));
	this.setTooltip(tooltip);

	final CustomCoordinatesSeries<String, Number> series = new CustomCoordinatesSeries<String, Number>();
	series.setColor(new RgbaColor(119, 152, 191, 0.5f));
	series.setName(this.eventType.getTypeName());
	series.setData(this.getSeriesData());
	this.addSeries(series);

}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:41,代码来源:SplatterChartOptions.java


示例2: createJacksonMapper

import com.googlecode.wickedcharts.highcharts.options.Function; //导入依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
private ObjectMapper createJacksonMapper() {

	this.jacksonModule.addSerializer(Center.class, new CenterSerializer());
	this.jacksonModule.addSerializer(SimpleColor.class, new SimpleColorReferenceSerializer());
	this.jacksonModule.addSerializer(HighchartsColor.class, new HighchartsColorReferenceSerializer());
	this.jacksonModule.addSerializer(HexColor.class, new HexColorReferenceSerializer());
	this.jacksonModule.addSerializer(LowercaseEnum.class, new LowercaseEnumSerializer());
	this.jacksonModule.addSerializer(PixelOrPercent.class, new PixelOrPercentSerializer());
	this.jacksonModule.addSerializer(Symbol.class, new SymbolSerializer());
	this.jacksonModule.addSerializer(RgbaColor.class, new RgbaColorReferenceSerializer());
	this.jacksonModule.addSerializer(NullColor.class, new NullColorReferenceSerializer());
	this.jacksonModule.addSerializer(MinorTickInterval.class, new MinorTickIntervalSerializer());
	this.jacksonModule.addSerializer(Function.class, new FunctionSerializer());
	this.jacksonModule.addSerializer(CssStyle.class, new CssStyleSerializer());
	this.jacksonModule.addSerializer(DateTimeLabelFormat.class, new DateTimeLabelFormatSerializer());
	this.jacksonModule.addSerializer(Coordinate.class, new CoordinateSerializer());
	this.jacksonModule.addSerializer(Crosshair.class, new CrosshairSerializer());
	this.jacksonModule.addSerializer(RangeCoordinate.class, new RangeCoordinateSerializer());
	this.jacksonModule.addSerializer(Bubble.class, new BubbleSerializer());

	ObjectMapper mapper = createDefaultObjectMapper();
	mapper.setLocale(Locale.ENGLISH);
	mapper.registerModule(this.jacksonModule);
	return mapper;
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:27,代码来源:JsonRenderer.java


示例3: setChartEventsLoad

import com.googlecode.wickedcharts.highcharts.options.Function; //导入依赖的package包/类
/**
 * Null-safe setter for the chart.events.load configuration.
 */
public void setChartEventsLoad(final Options options, final Function function) {
	if (options.getChartOptions() == null) {
		options.setChartOptions(new ChartOptions());
	}
	if (options.getChartOptions().getEvents() == null) {
		options.getChartOptions().setEvents(new Events());
	}
	if (options.getChartOptions().getEvents().getLoad() == null) {
		options.getChartOptions().getEvents().setLoad(function);
	}
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:15,代码来源:OptionsUtil.java


示例4: serialize

import com.googlecode.wickedcharts.highcharts.options.Function; //导入依赖的package包/类
@Override
public void serialize(final Function value, final JsonGenerator jgen, final SerializerProvider provider)
    throws IOException, JsonProcessingException {

	// raw values are needed
	// otherwise the js function can not be evaluated
	jgen.writeRawValue(value.getFunction());
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:9,代码来源:FunctionSerializer.java


示例5: createChartValue

import com.googlecode.wickedcharts.highcharts.options.Function; //导入依赖的package包/类
private WickedChart createChartValue(String title, List<String> titles, List<Number> values, Number min, Number max) {
    Options options = new Options();
    options.setChartOptions(new ChartOptions().setType(SeriesType.COLUMN));
    
    options.setTitle(new Title(title));
    
    options.setxAxis(new Axis().setCategories(titles));
    options.setyAxis(new Axis().setMin(min).setMax(max));
    
    options.setLegend(
            new Legend()
                .setLayout(LegendLayout.VERTICAL)
                .setBackgroundColor(new HexColor("#FFFFFF"))
                .setAlign(HorizontalAlignment.LEFT)
                .setVerticalAlign(VerticalAlignment.TOP).setX(100).setY(70).setFloating(Boolean.TRUE).setShadow(Boolean.TRUE));
    
    options.setTooltip(
            new Tooltip().setFormatter(new Function().setFunction(" return ''+ this.x +': '+ this.y;")));
    
    options.setPlotOptions(
            new PlotOptionsChoice()
                .setColumn(new PlotOptions().setPointPadding(0.2f).setBorderWidth(0)));
    
    Series<Number> setData = new SimpleSeries().setName("Value").setData(values);
    options.addSeries(setData);
    
    return new WickedChart(options);
}
 
开发者ID:isisaddons-legacy,项目名称:isis-wicket-wickedcharts,代码行数:29,代码来源:CollectionContentsAsSummaryCharts.java


示例6: GraficoTortaClientes

import com.googlecode.wickedcharts.highcharts.options.Function; //导入依赖的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


示例7: PieWithGradientOptions

import com.googlecode.wickedcharts.highcharts.options.Function; //导入依赖的package包/类
public PieWithGradientOptions(List<Log> _lista, Date _fechaDesde,
		Date _fechaHasta, TipoPlato _tipoPlato) {

	SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yy");
	setTitle(new Title("Productos - "
			+ (_fechaDesde != null ? formato.format(new java.util.Date(
					_fechaDesde.getTime())) : "1º Registro")
			+ " - "
			+ (_fechaHasta != null ? formato.format(new java.util.Date(
					_fechaHasta.getTime())) : "Último Registro")));

	List<Number> valores = new ArrayList<Number>();
	List<String> labels = new ArrayList<String>();
	for (Log entry : _lista) {
		valores.add(entry.getCantidad());
		labels.add(entry.getProducto().getNombre());
	}

	addSeries(new SimpleSeries()
			.setColor(Color.DARK_GRAY.darker())
			.setName(_tipoPlato.toString())
			.setData(valores)
			.setDataLabels(
					new DataLabels()
							.setEnabled(Boolean.TRUE)
							.setColor(new HexColor("#000000"))
							.setAlign(HorizontalAlignment.CENTER)
							.setX(0)
							.setY(0)
							.setFormatter(
									new Function()
											.setFunction(" return this.y;"))
							.setStyle(
									new CssStyle()
											.setProperty("font-size",
													"13px")
											.setProperty("font-family",
													"Verdana, sans-serif"))));

	setyAxis(new Axis().setMin(0).setTitle(new Title("Cantidad")));

	setLegend(new Legend(Boolean.TRUE));

	setxAxis(new Axis().setCategories(labels).setLabels(
			new Labels()
					.setRotation(-45)
					.setAlign(HorizontalAlignment.RIGHT)
					.setStyle(
							new CssStyle().setProperty("font-size",
									"13px").setProperty("font-family",
									"Verdana, sans-serif"))));

	setChartOptions(new ChartOptions().setType(SeriesType.COLUMN)
			.setMarginTop(50).setMarginRight(50).setMarginBottom(100)
			.setMarginLeft(80));
}
 
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:57,代码来源:Torta.java


示例8: ColumnChartOptions

import com.googlecode.wickedcharts.highcharts.options.Function; //导入依赖的package包/类
public ColumnChartOptions(final ChartConfiguration configuration) {
	this.eventType = configuration.getEventType();
	this.attributeName = configuration.getAttributeName();
	this.attributeType = configuration.getAttributeType();
	this.rangeSize = configuration.getRangeSize();
	this.title = configuration.getTitle();

	this.setChartOptions(new ChartOptions().setType(SeriesType.COLUMN));

	this.setGlobal(new Global().setUseUTC(Boolean.TRUE));

	this.setTitle(new Title(this.title));

	this.setxAxis(new Axis().setCategories(this.eventType.getTypeName()).setTitle(new Title(null)));

	this.setyAxis(new Axis().setTitle(new Title("Frequency").setAlign(HorizontalAlignment.HIGH)).setLabels(new Labels().setOverflow(Overflow.JUSTIFY)));

	this.setTooltip(new Tooltip().setFormatter(new Function("return ''+this.series.name +': '+ this.y;")));

	this.setPlotOptions(new PlotOptionsChoice().setBar(new PlotOptions().setDataLabels(new DataLabels().setEnabled(Boolean.TRUE))));

	this.setLegend(new Legend().setLayout(LegendLayout.VERTICAL).setAlign(HorizontalAlignment.RIGHT).setVerticalAlign(VerticalAlignment.TOP).setX(-100).setY(100).setFloating(Boolean.TRUE).setBorderWidth(1).setBackgroundColor(new HexColor("#ffffff")).setShadow(Boolean.TRUE));

	this.setCredits(new CreditOptions().setEnabled(Boolean.FALSE));

	for (final SimpleSeries serie : this.buildSeries()) {
		this.addSeries(serie);
	}

}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:31,代码来源:ColumnChartOptions.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ViewUtils类代码示例发布时间:2022-05-22
下一篇:
Java MetroConfig类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap