Leave feedback
  • Question

    Dynamically set values for the X axis in a line chart

Enter a new topic
  • Andrés Cheda Andrés Cheda
    0 likes 734 views

    Hi,

    I need to show a chart like the attachment. I have problems with the horizontal line, the purple line.

    My project is an XML data input, but then not come xml values for the x axis of the horizontal line. In what way I can define values for the x axis so dynamic ?. Would appreciate an example that works if someone has.

     

    Thanks a lot,

    Andrés.

    Friday 04 December, 2015

    Attached files

  • Best Answer
    David Bares David Bares OpenText Employee Administrator StreamServe Employee
    1 likes

    Here you can see the calcualtion needed to get the logical x positions for the line.

    I did not even try to calculate the vertical scaling dynamically, but the horizontal should be dynamic enough for your purpose.

    You can also see how I have used the transformation to process your data so that it would look like strs message data.

    Wednesday 09 December, 2015

    Attached files

  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    0 likes

    You know the full length of the X Axis, you defined that in chart plot somewhere.

    Then if you know the number of Y values for the line, it should be relatively easy to calculate the offset and step. Then you just need to create an array of X values that you will use with Y values from data to build the line.

    Can you share the data for the chart?

    Friday 04 December, 2015
  • Andrés Cheda Andrés Cheda
    0 likes

    Hi,

    The data for the chart is attached.

     

    Thank you for the answer.

     

    Monday 07 December, 2015

    Attached files

  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    1 likes

    Here you can see the calcualtion needed to get the logical x positions for the line.

    I did not even try to calculate the vertical scaling dynamically, but the horizontal should be dynamic enough for your purpose.

    You can also see how I have used the transformation to process your data so that it would look like strs message data.

    Wednesday 09 December, 2015

    Attached files

  • Andrés Cheda Andrés Cheda
    0 likes

    Thank you very much for the reply, very kind of you.

    Thanks a lot,

    Andrés.

     

    Tuesday 15 December, 2015

 

Latest from the blogs

Read more