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.

The chart is getting plot at the end of the page

See original GitHub issue

This 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
timocovcommented, Jul 20, 2020

Seems like something wrong on my angular project itself

I think you can check what affect position of the chart with devtools.

0reactions
xxholyChalicexxcommented, Jul 20, 2020

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Format elements of a chart - Microsoft Support
Change format of chart elements by using the Format task pane or the ribbon. You can format the chart area, plot area, data...
Read more >
A Complete Guide to Area Charts | Tutorial by Chartio
Area charts combine the line chart and bar chart for more specific purposes. Use this guide to learn the best times and ways...
Read more >
Visualization with Plotly.Express: Comprehensive guide
A detailed guide on how to create many visualizations with Plotly Express with layout styling, interactivity, animations, and many chart ...
Read more >
Build a Bar Chart - Tableau Help
To create a bar chart that displays total sales over a four-year period, follow these steps: Connect to the Sample - Superstore data...
Read more >
title options - Stata
If you put your title at position(1), it will end up above and to the right of the plot region. Now consider two...
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