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

When rendering an OrgChart, I get an error in the console: #10

Closed
peter-stuart-turner opened this issue Aug 22, 2018 · 4 comments
Closed

Comments

@peter-stuart-turner
Copy link

I get the following error: core.js:1673 ERROR TypeError: Cannot read property '__eventTarget' of null

I don;'t get these with charts from the core package, the OrgChart does however render correctly.

@FERNman
Copy link
Owner

FERNman commented Aug 22, 2018

I just created an OrgChart to try, and it worked like a charm. Are you sure that you have created it correctly?

@peter-stuart-turner
Copy link
Author

Pretty sure yeah?

<google-chart #chart (ready)="chart_ready()" (select)="org_chart_select($event)" type="OrgChart" [data]="chartData.data"
[columnNames]="chartData.columnNames" [options]="chartData.options">

public generate_chart_data() {
const data: ChartData = {
data: [
['ROA, ROIC, ROE', '', 'Return on Assets'],
['TA', 'ROA, ROIC, ROE', 'Total Assets'],
['NOPAT', 'ROA, ROIC, ROE', 'Net Operating Profit After Tax'],
['IC', 'ROA, ROIC, ROE', 'Invested Capital'],
['TE', 'ROA, ROIC, ROE', 'Total Equity'],
['Exp', 'NOPAT', 'Expenses'],
['Tax', 'NOPAT', 'Tax Rate'],
['OR', 'NOPAT', 'Operating Revenue'],
['TA', 'ROA', 'Total Assets'],
['Utl', 'Exp', 'Utilities'],
['Opex', 'Exp', 'Operational Expenditure'],
['Oexp', 'Exp', 'Other Expenses'],
['UntS', 'OR', 'Units Sold'],
['SP', 'OR', 'Sales Price'],
['Lbr', 'Opex', 'Labour Costs'],
['Mnt', 'Opex', 'Maintenance Costs'],
['Stock', 'UntS', 'Stock / Units Not Sold'],
['UntPr', 'UntS', 'Units Produced'],
['PCap', 'UntPr', 'Plant Capacity'],
['TCU', 'UntPr', 'Total Capacity Utilization'],
['OEE', 'TCU', 'Overall Equipment Effectiveness'],
['Utz', 'TCU', 'Utilization'],
['A', 'OEE', 'Availability'],
['P', 'OEE', 'Performance'],
['Q', 'OEE', 'Quality'],
],
columnNames: ['Name', 'Manager', 'Tooltip'],
options: {
'title': 'Organizational Chart View',
allowHtml: true,
allowCollapse: true,
nodeClass: 'defaultNode',
selectedNodeClass: 'selectedNode',
}
}
return data;
}

@FERNman
Copy link
Owner

FERNman commented Aug 22, 2018

Strange. Your code works for me...

@peter-stuart-turner
Copy link
Author

Ok - must be something my side then, will close?

@FERNman FERNman closed this as completed Aug 29, 2018
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

No branches or pull requests

2 participants