pablrod / p5-Chart-Plotly

Generate html/javascript charts with perl data using javascript library Plotly.js
MIT License
9 stars 4 forks source link

annotations showarrow => 'false' does not work #62

Closed averlon closed 6 months ago

averlon commented 6 months ago

I have the following code:

$av_obj_PLOT->layout(
  {
    annotations => [
      {
        xref => 'paper',
        yref => 'paper',
        y => 1,
        text => 'Quelle: Grundwasserfrühwarnsystem Forstinning - www.gwfwsfi.de',
        font => {
          family => 'Arial',
          size => 12,
          color => 'rgb(150,150,150)'
        },
        showarrow => 'false',
      },
      {
        xref => 'paper',
        x => 0.95,
        y => $av_tmparr_DATA[$#av_tmparr_DATA],
        xanchor => 'left',
        yanchor => 'middle',
        text => $av_tmparr_DATA[$#av_tmparr_DATA],
        font => {
          family => 'Arial',
          size => 12,
          color => 'rgb(150,150,150)'
        },
        showarrow => 'false',
      },
    ],
    title => {
      text => 'Grundwasserpegel unter Geländeoberfläche Pegelmesser',
      font => {
        color => '#019999',
      }
    },
    xaxis => {
      ticks => 'outside',
      automargin => 'height',
      color => '#019999',
    },
    yaxis => {
      title => 'mWs',
      color => '#019999',
      tickformat => ".2f",
      ticklabelposition => 'outside',
    }
  }
);

But the arrow is still shown!

What am I doing wrong?

gw_image1

iynehz commented 6 months ago

Instead of the string 'false', try JSON::false.

averlon commented 6 months ago

this works - thanks!