0

I'm trying to display the price of a zero-coupon bond in a graph, as the days go from 150 days to maturity to 0 days to maturity, the price rises.

When I create the graph the days on the x-axis is always displayed rising however. Is there a way to display the graph as I want to, without using negative numbers approaching zero?

Picture of what it looks like now: Current

How I'd like it to look: Ideal

Marcus Grass
  • 1,043
  • 2
  • 17
  • 38

1 Answers1

0

Solved it by reversing the array from the backend, while simulatneously reversing the xaxis by:

options={
            'title':'Orders', 
            'vAxis': {'title': "Price in percent [%]"},
            'hAxis': {
                'title': "Days to maturity [Days]",
                'direction': "-1",
                'gridlines': { 'count': '6'}
                },
           }    
Marcus Grass
  • 1,043
  • 2
  • 17
  • 38