How to get chart info? (ex: x/y-axis label/title...)

Loc Ngo shared this question 3 years ago
Answered

Hi Yellowfin team,


I see that the chart in yellowfin report is a image, and I need to get chart info. So do you have a Web Service for get chart info? ( ex: x/y-axis label/title ...). If not, do you have another way to get it?


Thanks and Regards

Comments (9)

photo
1

Hello,

You should be able to get this info from the web service, however you may have to do some processing to get the output that you want.

the information you are looking for should be contained within "HTML"

This should grab all HTML related to displaying the chart - you will then need to strip or match the returned info to get what you need

The link below covers our webservices calls.

http://wiki.yellowfin.com.au/display/USER73/Report+Service#ReportService-ReportChart

I hope this helps!

Best regards,

Pete

photo
1

Hi Peter,


I see that the data return is a binary data. So how can I get info from this data.


Thanks and Regards,

photo
1

Hello,


I realised that after I sent you the message, that I used HTMLCHARTONLY


you should use "HTML"


This will return the raw HTML which shoul have the info


Sorry about that!

Best regards,

Pete

photo
1

Hi Perter,


I can not receive data as HTML, I attached file result in this comment.


Thanks and Regards,

photo
1

Hello Loc,


Can you please send us the code that you used to generate that JSON file please?


Best regards,

Pete

photo
1

Hi Peter, 


This is my code using for generate JSON

val rsr = new ReportServiceRequest

    rsr.setLoginId("admin@yellowfin.com.au")
    rsr.setPassword("test")
    rsr.setOrgId(1)
    rsr.setReportRequest("HTML")
    rsr.setReportId(52351)
    Try {
      val rs = rssbs1.remoteReportCall(rsr)
      rs.getStatusCode match {
        case SUCCESS =>
          rs
        case _ =>
          throw new Exception(WebserviceException.getErrorString(rs.getErrorCode))
      }
    }


Thanks and Regards.

photo
1

Hello Loc,


We are still looking into tis for you.


Sorry for the delay! We will update this ticket as we have more information.


Best regards,

Pete

photo
1

Hello Loc,


Unfortunately the titles and labels on charts aren't available via webservice.


As the chart is a rendered image, only the meta-data that you have seen in the XML is available to be processed further.


Very sorry for the inconvenience and I shall push this as an enhancement request for webservices in a future release.


Best regards,

Pete

photo
1

Thank Peter,