Skip to content

Page reload when zooming or updating echart/highchart #3256

Closed Answered by falkoschindler
golgitab asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I re-created the large scatter demo in NiceGUI and it runs equally fast:

import numpy as np
from nicegui import ui

def gen_data(count, offset):
    x = np.random.rand(count) * 10
    y = np.sin(x) + offset + 0.1 * np.random.randn(count) * x
    return np.stack([x, y]).T.tolist()

data1 = gen_data(500_000, 0)
data2 = gen_data(500_000, 10)
ui.echart({
    'title': {'text': f'{len(data1) + len(data2)} Points'},
    'tooltip': {},
    'toolbox': {'left': 'center', 'feature': {'dataZoom': {}}},
    'legend': {'orient': 'vertical', 'right': 10},
    'xAxis': [{}],
    'yAxis': [{}],
    'dataZoom': [{'type': 'inside'}, {'type': 'slider'}],
    'animation': False,
    'series': [
        {
…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@golgitab
Comment options

Comment options

You must be logged in to vote
1 reply
@golgitab
Comment options

Comment options

You must be logged in to vote
1 reply
@golgitab
Comment options

Answer selected by golgitab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants