/** Sets the chart engine. */ public void setEngine(ChartEngine engine) { if (_engine != engine) { _engine = engine; } //Always redraw smartDrawChart(); }
/** * whether show the chart's tooltip. * @param showTooltiptext true if want to pop the tooltiptext (default to true). */ public void setShowTooltiptext(boolean showTooltiptext) { if (_showTooltiptext == showTooltiptext) { return; } _showTooltiptext = showTooltiptext; smartDrawChart(); }
/** * Set true to show three dimensional graph (If a type of chart got no 3d peer, this is ignored). */ public void setThreeD(boolean b) { if (_threeD == b) { return; } _threeD = b; smartDrawChart(); }
/** * whether show the chart's legend. * @param showLegend true if want to show the legend (default to true). */ public void setShowLegend(boolean showLegend) { if (_showLegend == showLegend) { return; } _showLegend = showLegend; smartDrawChart(); }
/** * Set the background alpha (transparency, 0 ~ 255). * @param alpha the transparency of background color (0 ~ 255, default to 255 opaque). */ public void setBgAlpha(int alpha) { if (alpha == _bgAlpha) { return; } if (alpha > 255 || alpha < 0) { alpha = 255; } _bgAlpha = alpha; smartDrawChart(); }
public void onChange(ChartDataEvent event) { smartDrawChart(); } }
/** * Sets the date format used by date related Chart. * @param format */ public void setDateFormat(String format) { if (Objects.equals(format, _dateFormat)) { return; } _dateFormat = format; smartDrawChart(); }
public boolean addEventListener(String evtnm, EventListener<? extends Event> listener) { final boolean ret = super.addEventListener(evtnm, listener); if (Events.ON_CLICK.equals(evtnm) && ret) smartDrawChart(); //since Area has to generate return ret; }
/** * Set the chart orientation. * @param orient vertical or horizontal (default to vertical) */ public void setOrient(String orient) { if (Objects.equals(orient, _orient)) { return; } _orient = orient; smartDrawChart(); }
/** Sets the period used in Time Series Chart. The value can be * "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", and "year". */ public void setPeriod(String period) { if (Objects.equals(period, _period)) { return; } _period = period; smartDrawChart(); }
/** * Set the chart's type (Chart.PIE, Chart.BAR, Chart.LINE, etc.). * * <p>Default: pie. * */ public void setType(String type) { if (Objects.equals(_type, type)) { return; } _type = type; smartDrawChart(); }
/** Sets the time zone that this Time Series Chart belongs to, or null if * the default time zone is used. * <p>The default time zone is determined by {@link org.zkoss.util.TimeZones#getCurrent}. */ public void setTimeZone(TimeZone tzone) { if (Objects.equals(tzone, _tzone)) { return; } _tzone = tzone; smartDrawChart(); }
/** * Set the chart's title. * @param title the chart's title. * */ public void setTitle(String title) { if (Objects.equals(_title, title)) { return; } _title = title; smartDrawChart(); }
/** * Set the label in xAxis. * @param label label in xAxis. */ public void setXAxis(String label) { if (Objects.equals(_xAxis, label)) { return; } _xAxis = label; smartDrawChart(); }
/** * Set the label in yAxis. * @param label label in yAxis. */ public void setYAxis(String label) { if (Objects.equals(_yAxis, label)) { return; } _yAxis = label; smartDrawChart(); }
/** * Sets the legend font of this chart. If you saw squares rather than correct * words in legend, check whether the default legend font supports your * characters (e.g. Chinese). You probably have to set this font accordingly. * @param font the legend font of this chart */ public void setLegendFont(Font font) { if (Objects.equals(_legendFont, font)) { return; } _legendFont = font; smartDrawChart(); }
/** * Sets the title font of this chart. If you saw squares rather than correct * words in title, check whether the default title font supports your * characters (e.g. Chinese). You probably have to set this font accordingly. * @param font the title font of this chart */ public void setTitleFont(Font font) { if (Objects.equals(font, _titleFont)) { return; } _titleFont = font; smartDrawChart(); }
public void onPageAttached(Page newpage, Page oldpage) { super.onPageAttached(newpage, oldpage); if (_model != null) { smartDrawChart(); if (_dataListener != null) { _model.removeChartDataListener(_dataListener); _model.addChartDataListener(_dataListener); } } }
/** * Override super class to prepare the int width. */ public void setWidth(String w) { if (Objects.equals(w, getWidth())) { return; } _intWidth = stringToInt(w); super.setWidth0(w); //ZK-2895: call the method which do not check vflex smartDrawChart(); }
/** * Override super class to prepare the int height. */ public void setHeight(String h) { if (Objects.equals(h, getHeight())) { return; } _intHeight = stringToInt(h); super.setHeight0(h); //ZK-2895: call the method which do not check hflex smartDrawChart(); }