We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to use plottable with angular but I don't know what to put in the chart.renderTo or how to set up the HTML app component.
chart.renderTo
Any hints appreciated!
import { Component } from '@angular/core'; import { Plots, Scales, Axes, Dataset, Components } from 'plottable'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'app'; name = 'foo'; chart: HTMLElement; onChangeFirst() { this.name = 'goo'; const xScale = new Scales.Linear(); const yScale = new Scales.Linear(); const xAxis = new Axes.Numeric(xScale, 'bottom'); const yAxis = new Axes.Numeric(yScale, 'left'); const plot = new Plots.Line(); plot.x(function(d) { return d.x; }, xScale); plot.y(function(d) { return d.y; }, yScale); const data = [ { "x": 0, "y": 1 }, { "x": 1, "y": 2 }, { "x": 2, "y": 4 }, { "x": 3, "y": 8 } ]; const dataset = new Dataset(data); plot.addDataset(dataset); const chart = new Components.Table([ [yAxis, plot], [null, xAxis] ]); // chart.renderTo(this.chart); chart.renderTo("svg#tutorial-result"); } }
The text was updated successfully, but these errors were encountered:
bumparoosky
Sorry, something went wrong.
News on this!?
No branches or pull requests
I am trying to use plottable with angular but I don't know what to put in the
chart.renderTo
or how to set up the HTML app component.Any hints appreciated!
The text was updated successfully, but these errors were encountered: