question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

using .highcharts() to assign options

See original GitHub issue

I wanted to do something like http://www.highcharts.com/demo/synchronized-charts. While I had my npm compiler running and listening for file changes (npm start which is “npm run tsc:w” and “npm run lite”), everything works well (with following errors … but works great). However, when I restart my “npm start” and it goes through the compiler again, I get

[0] app/station-dashboard.component.ts(249,10): error TS2345: Argument of type ’ { chart: { marginLeft: number; zoomType: string; spacingTop: number; spacingBott om: number; }; ti…’ is not assignable to parameter of type ‘HighchartsOptions’ . [0] Types of property ‘series’ are incompatible. [0] Type ‘{ data: any; name: any; color: any; fillOpacity: number; tooltip: { valueSuffix: string; }; }[]’ is not assignable to type ‘HighchartsIndividualSe riesOptions[]’. [0] Type ‘{ data: any; name: any; color: any; fillOpacity: number; tooltip : { valueSuffix: string; }; }’ is not assignable to type ‘HighchartsIndividualSe riesOptions’. [0] Object literal may only specify known properties, and ‘color’ does n ot exist in type ‘HighchartsIndividualSeriesOptions’.

It’s not liking where I say :

$('<chart class="stationChart col-md-12">') .appendTo(‘#container’) .highcharts({ chart: { marginLeft: 80, // Keep all charts left aligned zoomType: ‘x’, spacingTop: 20, spacingBottom: 20 },

How can I make it so I can call .highcharts ( ) and pass in options there?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:34 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gevgenycommented, Jul 19, 2016

@sspilleman Try to set options: Object; rather than options: HighchartsOptions;

1reaction
huntxiaocommented, Dec 29, 2020

image I want to create a stacked column chart, but I don’t know why there is a redline below param renderTo,

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set options - Highcharts
Highcharts use a JavaScript object structure to define the options or settings of a chart. This article explains how the options object works...
Read more >
Set Options in Highcharts - Highcharts official support forum
Hi, You can update each charts options by going through all of them and updating each with chart.update. Code: Select all
Read more >
chart | highcharts API Reference
The distance between the outer edge of the chart and the content, like title or legend, or axis title and labels if present....
Read more >
Class: Chart - Highcharts API
The options structure for the chart after merging #defaultOptions and #userOptions. ... Add a series to the chart as drilldown from a specific...
Read more >
Highcharts JS API Reference
Welcome to the Highcharts JS (highcharts) Options Reference. These pages outline the chart configuration options, and the methods and properties of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found