Skip to content

Instantly share code, notes, and snippets.

@shacheeswadia
Created November 21, 2021 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shacheeswadia/3578292cc340687f75915127208b5445 to your computer and use it in GitHub Desktop.
Save shacheeswadia/3578292cc340687f75915127208b5445 to your computer and use it in GitHub Desktop.
// create surface chart
var chart = anychart.surface();
// enable markers and set data for them
chart.markers().enabled(true).data(result);
// set x axis labels format
chart
.xAxis()
.labels()
.format(function () {
return data.x[Math.round(this.value)];
});
// set x axis scale maximum
chart.xScale().maximum(data.x.length - 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment