The chart is getting plot at the end of the page
See original GitHub issueThis is how i have set the chart in the page:
var chartElement = document.getElementById(‘chartRender’) as HTMLElement var chart = createChart(chartElement, { width: 600, height: 300, timeScale: { timeVisible: true, secondsVisible: false, }, }); chart.timeScale().fitContent(); document.body.appendChild(chartElement); var lineSeries = chart.addLineSeries({ color:‘#F05894’, title:this.chartDataSet[0].label }); var anotherLineSeries = chart.addLineSeries({ title:this.chartDataSet[1].label }); lineSeries.setData(dataSet); anotherLineSeries.setData(anotherDataSet)
The problem here is the location of <div id="chartRender"></div>
is in middle of the page but my chart is getting render at the bottom of the page. Any idea on why is it happening like that
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
I think you can check what affect position of the chart with devtools.
I was not able to produce the same error in the JSFiddle.Its working how its suppose to be. Seems like something wrong on my angular project itself. Thank you for your time though!