Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polar chart examples #381

Merged
merged 6 commits into from
Nov 22, 2023
Merged

Conversation

jacekpapiniak
Copy link
Contributor

Adds some examples of polar charts from plotly doc: https://plotly.com/javascript/polar-chart/

@jacekpapiniak
Copy link
Contributor Author

Initialy related to #169 but from I found I could not force polar chart to display GridShape as linear and with hole inside, despite setting following properties on polar layout

AngularAxis.Type = Linear
GridShape = Linear
Hole = 10

I did try that with the js plotly polar chart and it looks like we are not able to display grid shape as linear.

Example in plotly.js that I tried:

var data = [
  {
    type: "scatterpolar",
    r: [1, 2, 3, 4],
    theta: [0, 45, 90, 135], // The angles at which data points are located
    mode: "lines",
    fill: "toself",
    name: "Linear Polar Chart",
    subchart: "polar"
  }
];

var layout = {
  polar: {
    radialaxis: {
      visible: true,
      range: [0, 4] // Set the range of the radial axis
    },
    gridshape: "linear",
    angularaxis: {
      type: "linear", // Set the angular axis type to linear
      tickmode: "linear",
      dtick: 45 // Specify the angular tick interval (in degrees)
    }
  }
};

Plotly.newPlot('myDiv', data, layout)

sean-mcl
sean-mcl previously approved these changes Nov 22, 2023
@sean-mcl sean-mcl merged commit 60ea6a1 into LayTec-AG:main Nov 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants