0

I am working with xpages and I need to present data points on a graph. I need to be able to select a document which I need to plot (I tried doing that by storing data points in a view). I tried to use javascript to define my plot but I can't get it to plot a file/document with data. It doesn't work unless I hard code all the data points. Is there something I am missing? Any suggestions?

  • 1
    What have you tried so far? you need to add more details to your question in order to get usable answers. For now maybe this can help: http://blog.wilhow.net/2013/03/17/charting-104-in-xpages-connecting-to-notes-document/ – Per Henrik Lausten Mar 19 '13 at 10:23
  • Adding some code snippet would help in identifying your problem. – Naveen Mar 19 '13 at 10:33
  • The link you sent is perfect actually, I'll give that a go. So far I managed to hard code the data for the graph in a script library (javascript) and connect it to a button which you can click to view the graph which has been hard coded. I wanted to find a way of plotting that graph using the same data but instead of hard coding it I wanted to select a filed/ocument which contains that data so I can plot it. I tried to store that data in a view but couldn't find a way of getting that data from the view to plot. –  Mar 19 '13 at 10:40
  • 1
    Code samples and more detailed explanation what you tried are essential – stwissel Mar 19 '13 at 15:24

1 Answers1

1

Iona, depending on your plot library (I like d3js), you will find JavaScript methods that allow you to retrieve those values using an Ajax call to an URL. That is the first step you need to sort out (with a static JSON file on your Domino).

Once you have that working, then you replace the static JSON file with the Ajax/Json control from the extension library that delivers values based on a script you write. There you can read a view, get values from a document or whatever fits your needs.

stwissel
  • 20,110
  • 6
  • 54
  • 101