Menu

PlotLine Not Working

bala
2012-08-17
2012-09-08
  • bala

    bala - 2012-08-17

    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")))

     
  • Naveen

    Naveen - 2012-09-08

    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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.