<jupyter_start><jupyter_text>Example: CanvasXpress stacked Chart No. 1This example page demonstrates how to, using the Python package, create a chart that matches the CanvasXpress online example located at:https://www.canvasxpress.org/examples/stacked-1.htmlThis example is generated using the reproducible JSON obtained from the above page and the `canvasxpress.util.generator.generate_canvasxpress_code_from_json_file()` function.Everything required for the chart to render is included in the code below.  Simply run the code block.<jupyter_code>from canvasxpress.canvas import CanvasXpress 
from canvasxpress.js.collection import CXEvents 
from canvasxpress.render.jupyter import CXNoteBook 

cx = CanvasXpress(
    render_to="stacked1",
    data={
        "y": {
            "vars": [
                "Var1",
                "Var2",
                "Var3"
            ],
            "smps": [
                "Smp1",
                "Smp2",
                "Smp3",
                "Smp4",
                "Smp5",
                "Smp6",
                "Smp7",
                "Smp8",
                "Smp9",
                "Smp10",
                "Smp11",
                "Smp12",
                "Smp13",
                "Smp14",
                "Smp15",
                "Smp16",
                "Smp17",
                "Smp18",
                "Smp19",
                "Smp20",
                "Smp21",
                "Smp22",
                "Smp23",
                "Smp24"
            ],
            "data": [
                [
                    2,
                    4,
                    6,
                    8,
                    3,
                    5,
                    7,
                    9,
                    2,
                    4,
                    6,
                    8,
                    3,
                    5,
                    7,
                    9,
                    3,
                    5,
                    7,
                    9,
                    4,
                    6,
                    8,
                    10
                ],
                [
                    4,
                    6,
                    8,
                    10,
                    3,
                    5,
                    7,
                    9,
                    2,
                    4,
                    6,
                    8,
                    1,
                    3,
                    5,
                    7,
                    2,
                    4,
                    6,
                    8,
                    3,
                    5,
                    7,
                    9
                ],
                [
                    3,
                    5,
                    7,
                    9,
                    4,
                    6,
                    8,
                    10,
                    3,
                    5,
                    7,
                    9,
                    2,
                    4,
                    6,
                    8,
                    4,
                    6,
                    8,
                    10,
                    3,
                    5,
                    7,
                    9
                ]
            ]
        },
        "x": {
            "Factor1": [
                "F1-A",
                "F1-A",
                "F1-A",
                "F1-A",
                "F1-A",
                "F1-A",
                "F1-A",
                "F1-A",
                "F1-B",
                "F1-B",
                "F1-B",
                "F1-B",
                "F1-B",
                "F1-B",
                "F1-B",
                "F1-B",
                "F1-C",
                "F1-C",
                "F1-C",
                "F1-C",
                "F1-C",
                "F1-C",
                "F1-C",
                "F1-C"
            ],
            "Factor2": [
                "F2-a",
                "F2-a",
                "F2-a",
                "F2-a",
                "F2-b",
                "F2-b",
                "F2-b",
                "F2-b",
                "F2-c",
                "F2-c",
                "F2-c",
                "F2-c",
                "F2-d",
                "F2-d",
                "F2-d",
                "F2-d",
                "F2-e",
                "F2-e",
                "F2-e",
                "F2-e",
                "F2-f",
                "F2-f",
                "F2-f",
                "F2-f"
            ],
            "Factor3": [
                "F3-i",
                "F3-i",
                "F3-j",
                "F3-j",
                "F3-k",
                "F3-k",
                "F3-l",
                "F3-l",
                "F3-m",
                "F3-m",
                "F3-n",
                "F3-n",
                "F3-o",
                "F3-o",
                "F3-p",
                "F3-p",
                "F3-q",
                "F3-q",
                "F3-r",
                "F3-r",
                "F3-s",
                "F3-s",
                "F3-t",
                "F3-t"
            ],
            "Factor4": [
                "F4-a",
                "F4-a",
                "F4-a",
                "F4-a",
                "F4-b",
                "F4-b",
                "F4-b",
                "F4-b",
                "F4-a",
                "F4-a",
                "F4-a",
                "F4-a",
                "F4-b",
                "F4-b",
                "F4-b",
                "F4-b",
                "F4-a",
                "F4-a",
                "F4-a",
                "F4-a",
                "F4-b",
                "F4-b",
                "F4-b",
                "F4-b"
            ],
            "Factor5": [
                "F5-a",
                "F5-b",
                "F5-c",
                "F5-d",
                "F5-e",
                "F5-f",
                "F5-g",
                "F5-h",
                "F5-i",
                "F5-j",
                "F5-k",
                "F5-l",
                "F5-m",
                "F5-n",
                "F5-o",
                "F5-p",
                "F5-q",
                "F5-r",
                "F5-s",
                "F5-t",
                "F5-u",
                "F5-v",
                "F5-w",
                "F5-x"
            ],
            "Factor6": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                8,
                7,
                6,
                5,
                4,
                3,
                2,
                1,
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8
            ]
        }
    },
    config={
        "colorScheme": "Blues",
        "foreground": "rgb(0,0,0)",
        "graphOrientation": "vertical",
        "graphType": "Stacked",
        "groupingFactors": [
            "Factor1"
        ],
        "sampleSpaceFactor": 1,
        "showTransition": False,
        "title": "Random Data",
        "treemapBy": [
            "Factor2",
            "Factor3"
        ]
    },
    width=613,
    height=613,
    events=CXEvents(),
    after_render=[],
    other_init_params={
        "version": 35,
        "events": False,
        "info": False,
        "afterRenderInit": False,
        "noValidate": True
    }
)

display = CXNoteBook(cx) 
display.render(output_file="stacked_1.html")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11431931016461981, 'fraction_numerical': 0.0374967337339953, 'mean_word_length': 0.4492616433169254, 'pattern_counts': {'":': 25, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '654097', 'license': 'MIT', 'n_tokens_mistral': 2357, 'n_tokens_neox': 2092, 'n_words': 367, 'path': 'tutorials/notebook/cx_site_chart_examples/stacked_1.ipynb', 'repo_name': 'docinfosci/canvasxpress-python', 'size': '7654'}