<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Inconsistent behavior when displaying chart in notebook in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/63841#M32379</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create some 3D charts. With the same code and same cluster, sometimes it can show, sometimes it cannot. Previously it cannot display, but last week I opened a notebook with failed run and found the result can be shown by itself (as the HTML is in the cell result). Now it doesn't work again. It just shows "script error" without displaying the chart. The script error should be some JS error. Any idea why? Thanks.&lt;/P&gt;&lt;P&gt;You can repro it by:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%pip install pyecharts
from pyecharts.globals import CurrentConfig, NotebookType
CurrentConfig.NOTEBOOK_TYPE = NotebookType.NTERACT

import random

from pyecharts import options as opts
from pyecharts.charts import Bar3D
from pyecharts.faker import Faker

data = [(i, j, random.randint(0, 12)) for i in range(6) for j in range(24)]
c = (
    Bar3D()
    .add(
        "",
        [[d[1], d[0], d[2]] for d in data],
        xaxis3d_opts=opts.Axis3DOpts(Faker.clock, type_="category"),
        yaxis3d_opts=opts.Axis3DOpts(Faker.week_en, type_="category"),
        zaxis3d_opts=opts.Axis3DOpts(type_="value"),
    )
    .set_global_opts(
        visualmap_opts=opts.VisualMapOpts(max_=20),
        title_opts=opts.TitleOpts(title="repro"),
    )
)
c.render_notebook()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2024 17:22:06 GMT</pubDate>
    <dc:creator>MikeGo</dc:creator>
    <dc:date>2024-03-15T17:22:06Z</dc:date>
    <item>
      <title>Inconsistent behavior when displaying chart in notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/63841#M32379</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create some 3D charts. With the same code and same cluster, sometimes it can show, sometimes it cannot. Previously it cannot display, but last week I opened a notebook with failed run and found the result can be shown by itself (as the HTML is in the cell result). Now it doesn't work again. It just shows "script error" without displaying the chart. The script error should be some JS error. Any idea why? Thanks.&lt;/P&gt;&lt;P&gt;You can repro it by:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%pip install pyecharts
from pyecharts.globals import CurrentConfig, NotebookType
CurrentConfig.NOTEBOOK_TYPE = NotebookType.NTERACT

import random

from pyecharts import options as opts
from pyecharts.charts import Bar3D
from pyecharts.faker import Faker

data = [(i, j, random.randint(0, 12)) for i in range(6) for j in range(24)]
c = (
    Bar3D()
    .add(
        "",
        [[d[1], d[0], d[2]] for d in data],
        xaxis3d_opts=opts.Axis3DOpts(Faker.clock, type_="category"),
        yaxis3d_opts=opts.Axis3DOpts(Faker.week_en, type_="category"),
        zaxis3d_opts=opts.Axis3DOpts(type_="value"),
    )
    .set_global_opts(
        visualmap_opts=opts.VisualMapOpts(max_=20),
        title_opts=opts.TitleOpts(title="repro"),
    )
)
c.render_notebook()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 17:22:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/63841#M32379</guid>
      <dc:creator>MikeGo</dc:creator>
      <dc:date>2024-03-15T17:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent behavior when displaying chart in notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/64022#M32436</link>
      <description>&lt;P&gt;I don't understand why sometimes it works sometimes not. The code, cluster, browsers are the same. I asked in pyecharts community too. Unfortunately they said they don't have databricks notebook and cannot repro. This is not an issue in normal Juptyer notebook.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 16:59:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/64022#M32436</guid>
      <dc:creator>MikeGo</dc:creator>
      <dc:date>2024-03-18T16:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent behavior when displaying chart in notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/64041#M32442</link>
      <description>&lt;P&gt;Is it possible somehow the iframe used in the cell removed sandboxing and caused this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 00:57:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/64041#M32442</guid>
      <dc:creator>MikeGo</dc:creator>
      <dc:date>2024-03-19T00:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent behavior when displaying chart in notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/64044#M32444</link>
      <description>&lt;P&gt;Also, with same code, same browser, different workspaces, one works, other one not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the notebook with "script error", if I "Export cell" and get its iframe html and use displayHTML to display it, it works, so this means the JS and HTML inside is ok, but seems something makes on JS fail when running in the notebook directly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 02:49:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inconsistent-behavior-when-displaying-chart-in-notebook/m-p/64044#M32444</guid>
      <dc:creator>MikeGo</dc:creator>
      <dc:date>2024-03-19T02:49:50Z</dc:date>
    </item>
  </channel>
</rss>

