Hi, I'm trying to add a plot line after the graph is rendered, but I don't see the plot line. Any idea? I noticed the samples in fiddler were able to do it.
chart.getXAxis().addPlotLines(chart.getXAxis().createPlotLine().setDashStyle(DashStyle.SHORT_DASH).setWidth(2).setValue(getTime("2012-09")))
Hi Try this, this works for me:
PlotLine sampleLines = chart.getYAxis().createPlotLine() .setZIndex(5) .setValue(50) .setWidth(2) .setLabel( new PlotLineLabel() .setText("SAMPLE LINE") .setStyle(new Style().setFontWeight("bold") .setColor("#FFFFFF") .setFontFamily("Verdana") .setFontSize("9px")).setX(15) .setY(-5)).setColor(CAUTION_COLOR) .setDashStyle(DashStyle.SHORT_DASH);
chart.getYAxis().addPlotLines(sampleLines);
Log in to post a comment.
Hi,
I'm trying to add a plot line after the graph is rendered, but I don't see the plot line. Any idea? I noticed the samples in fiddler were able to do it.
chart.getXAxis().addPlotLines(chart.getXAxis().createPlotLine().setDashStyle(DashStyle.SHORT_DASH).setWidth(2).setValue(getTime("2012-09")))
Hi Try this, this works for me:
PlotLine sampleLines =
chart.getYAxis().createPlotLine()
.setZIndex(5)
.setValue(50)
.setWidth(2)
.setLabel(
new PlotLineLabel()
.setText("SAMPLE LINE")
.setStyle(new Style().setFontWeight("bold")
.setColor("#FFFFFF")
.setFontFamily("Verdana")
.setFontSize("9px")).setX(15)
.setY(-5)).setColor(CAUTION_COLOR)
.setDashStyle(DashStyle.SHORT_DASH);
chart.getYAxis().addPlotLines(sampleLines);