score:9
i had a similar issue when destroying a chart and recreating it. my workaround was to get the scroll position before destruction and reapply it after creation. for example in jquery:
var pos = $(document).scrolltop();
if (chart != undefined)
chart.destroy();
chart = new chart(ctx, chartoptions);
$(document).scrolltop(pos);
Source: stackoverflow.com
Related Query
- chart.js, after each update, avoid scrolling to top position
- what is wrong with my code ? java script chart position
- Update chart axis labels after hover - chart.js
- how to write labels along with data on top and bottom of each stack in bar chart
- VueJS + Chartjs - Chart only renders after code change
- My Chartjs is not updating after setstate full code attached Reactjs Update
- ChartJS fails to render one of the lines in cartesian chart following update after change to max Y axis label value
- How can i launch a modal after clicking each bar in Bar chart in Chartjs and also how can i get its data?
- Dynamically update values of a chartjs chart
- How can I create a horizontal scrolling Chart.js line chart with a locked y axis?
- Chartjs random colors for each part of pie chart with data dynamically from database
- Dynamically update the options of a chart in chartjs using Javascript
- chart.js Line chart with different background colors for each section
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- ChartJS bar chart with legend which corresponds to each bar
- Different color for each column in angular-chartjs bar chart
- chartjs - top and bottom padding of a chart area
- Can I specify a different font size for each row of text in Chart Title?
- Chart js - Get bar width after render
- Map event position to y axis value in chartjs line chart
- Adding a label to a doughnut chart in Chart.js shows all values in each chart
- Callback after line chart rendered
- chart js - Apply different color for each x-axes label
- Chart js: Update line chart having two data sets
- ChartJS Line chart cut off at the top and bottom
- Chart js - Draw center of each bubbles of a bubble chart
- Chart disappears just after finishing animation
- How to update data Chart in async way in Angular Chart.js?
- Chart.js update function (chart,labels,data) will not update the chart
- Chart JS display Data Value on the top of the Bar
More Query from same tag
- ng2-charts and annotation plugin: annotations not visible after data update
- Using ticks 'major' with Chart.js is overlapping with an unknown text
- Bubble Chart in Chartjs not working
- How to get the index of the barchart label that has been clicked with react-chart js-2?
- How to add an array to my line data?
- Show statistics in my diagram (php mysqli)
- Make Chart.js canvas responsive inside the resizeable div
- Styling problems with Chart.Js
- How to drill down charts with ChartJS?
- Chartjs, plot data based with unequal time intervals
- How to get Chart js labels in scientific notation
- Chart.js - Right use of object array
- How to get rid of old data and of old graph in Chart.js?
- chart js double tooltip on hover
- How to make bars dashed in chart js?
- real time scrolling based chart with chart.js
- ng2-charts & chart.js - Change background color
- How to create a dynamic multi-line chart in chart.js
- how to show information of hidden bar graphs also in a Tooltip using chart.js in angular?
- Dynamically create chart with Chart.js and PHP
- Chart.js HTML custom legend issues with doughnut chart
- Chartjs + DataLabelPlugin: Suddenly data labels are shown in every chart even without the plugin?
- Chart.js move start position of chart from axis
- Remove zeroline in chartJS Horizontal Bar chart
- Values on Y-axis disappear (hide under labels)
- How to color legend in angular-chart.js
- Issue with int numbers using chart.js
- How to create a gantt chart using Chart.js and populate dates?
- Creating a real time line chart using chartjs and firebase realtime db
- Setting ChartJS plugin on vue-chartjs not working