Line chart X axis data points are not visible completely

1
As shown in below screenshot Line chart X axis data points are not visible completely  and also Y-axis line is not visible    
asked
2 answers
1

Do you have specific formatting options set in your widget? Usually the default output avoids cutting off data like you’re showing on the y-axis, unless you’re forcing a maximum.

I’m sure there are formatting options in Plotly to help you to format this graph. The best way I’ve found to use and visualize all of the various formatting options is to use the Online Graph Maker. In there, you can set all kinds of formatting options using the visual editor, and then you can see the JSON output from that by opening the JSON tab and clicking on “Tree”. Any of the JSON layout options could be used in your widget. If you flip the widget into developer mode, you should be able to test those formatting options live in your Mendix app as well.

answered
1

I know this is an old question, but I wanted to throw this tidbit in here just in case others run into a similar problem. I have been trying to display a value above a bar, but no matter what I did with the margins it would always be cut off to some extent. Adding this flag to the data JSON fixed my problem:
“cliponaxis”: false

The final data JSON looks like this:

'[ {
  "x":' + $JSON_X + ',
  "y":' + $JSON_Y + ',
  "marker":{
    "color":' + $Colors + '
  },
  "type": "bar",
  "orientation": "v",
  "cliponaxis": false,
  "texttemplate": "$%{y:.2s}",
  "textposition": "outside"
} ]'

Hope this helps someone in the future!

answered