data-forge-notebook / plot

The simplest plotting API for JavaScript and TypeScript.
MIT License
19 stars 1 forks source link

Label text is slightly covered in plot with renderImage #39

Open xdk78 opened 3 years ago

xdk78 commented 3 years ago

After creating plot with renderImage with config like this label y is slightly covered

  const plt = plot(
    {
      x: x,
      y: y,
    },
    {
      x: {
        label: {
          font: {
            size: "18",
            family: "Verdana",
          },
          text: "Frequency [Hz]",
        },
      },
      y: {
        label: {
          font: {
            size: "18",
            family: "Verdana",
          },
          text: "Magnitude",
        },
      },
    }
  );

example plot c Maybe some padding in https://github.com/data-forge-notebook/plot/blob/master/packages/render-image/template-src/template/assets/index.css will fix this?

ashleydavis commented 3 years ago

Can you please submit code so I can test this.

xdk78 commented 3 years ago

I had to simplify code, so sorry for those very long arrays, but works the same as mine original code. Just copy code from https://pastebin.com/e5WsQgFW and run with typescript

ashleydavis commented 3 years ago

Thanks for the example code.

Can I run that with pastebin? I didn't see any run button.

xdk78 commented 3 years ago

No, just copy code from pastebin, create new file on your computer and run with Typescript compiler.

ashleydavis commented 3 years ago

If you could set it so I could just run it that would save me some time.

xdk78 commented 3 years ago

Sorry but I don't know how to easily set up online version of node.js environment with Typescript

xdk78 commented 3 years ago

I think it should be tested locally

ashleydavis commented 3 years ago

Yeah I'm happy to test it locally... if you could just provide me with a working test case please that will make it quick for me to replicate the problem.

You can email me a zip file to ashley@codecapers.com.au or you can use a GitHub repo, or you can attach a zip file here I think.

Thanks.