• Demos
    • JavaScript Charts
    • JavaScript StockCharts
  • Download/NPM
    • Download CanvasJS
    • Install via NPM
  • Integrations
    Front End Technology Samples
    • React Charts
    • Angular Charts
    • Vue.js Charts New!
    • jQuery Charts
    • Dashboards
    Server Side Technology Samples
    • PHP Charts
    • Python Charts New!
    • ASP.NET MVC Charts
    • Spring MVC Charts
    • JSP Charts
  • License
  • Blog
  • Docs
    • Chart Documentation
    • StockChart Documentation
  • Support Forum
    • Chart Support
    • StockChart Support
  • My Account
My Account
  • KEY FEATURES
    • Basic Chart
    • Chart with Animation
    • Chart with Zooming/Panning
    • Multi Series Chart
    • Chart with Multiple Axes
    • Chart with Logarithmic Axis
    • Chart with JSON Data
    • Dynamic Chart
    • Drilldown Chart
    • Responsive Chart
    • Synchronized Charts
  • LINE CHARTS
    • Line Chart
    • Dashed Line Chart
    • Multi Series Line Chart
    • Spline Chart
    • Multi Series Spline Chart
    • Step Line Chart
    • Multi Series Step Line Chart
  • BAR CHARTS
    • Bar Chart with Category Axis
    • Multi Series Bar Chart
    • Stacked Bar Chart
    • Stacked Bar 100% Chart
  • COLUMN CHARTS
    • Column Chart with Category Axis
    • Column Chart in Dark Theme
    • Multi Series Column Chart
    • Stacked Column Chart
    • Stacked Column 100% Chart
  • PIE & DOUGHNUT CHARTS
    • Pie Chart
    • Doughnut Chart
    • Doughnut Chart in Dark Theme
  • AREA CHARTS
    • Area Chart with Markers
    • Multi Series Area Chart
    • Spline Area Chart
    • Multi Series Spline Area Chart
    • Step Area Chart
    • Stacked Area Chart
    • Stacked Area 100% Chart
  • RANGE CHARTS
    • Range Column Chart
    • Multi Series Range Column Chart
    • Range Bar Chart
    • Multi Series Range Bar Chart
    • Range Area Chart
    • Multi Series Range Area Chart
    • Range Spline Area Chart
    • Multi Series Range Spline Area Chart
  • BUBBLE & SCATTER CHARTS
    • Bubble Chart with 3-Dimensional Data
    • Bubble Chart in Dark Theme
    • Scatter Chart
    • Multi Series Scatter Chart
  • FUNNEL & PYRAMID CHARTS
    • Funnel Chart with Index Labels
    • Funnel Chart without Neck
    • Pyramid Chart
  • FINANCIAL CHARTS
    • Candlestick Chart
    • Candlestick Chart from JSON Data
    • OHLC Chart
    • OHLC Chart from JSON Data
    • Box & Whisker Chart
    • Waterfall Chart
  • COMBINATION CHARTS
    • Pareto Chart
    • Error Bar Chart
    • Combination of Range Area & Line Chart
    • Combination of Candlestick & Line chart
  • DYNAMIC CHARTS
    • Dynamic Line Chart
    • Dynamic Column Chart
  • DATA BINDING
    • Chart with Data from CSV
    • Chart with Data from Database
    • Chart with Date-Time Axis from Database
  • JAVASCRIPT, JQUERY, REACT, ANGULAR, VUE.JS
    • JavaScript Charts
    • jQuery Charts
    • React Charts
    • Angular Charts
    • Vue.js Charts
  • SERVER SIDE TECHNOLOGIES
    • ASP.NET MVC Charts
    • PHP Charts
    • Spring MVC Charts
    • JSP Charts

Python Bubble Chart in Dark Theme

Download Python Django Chart Samples
  • Python Django Chart Samples
  • JavaScript Chart Samples
  • React Chart Samples
  • Angular Chart Samples
  • Vue.js Chart Samples
  • jQuery Chart Samples
  • PHP Chart Samples
  • ASP.NET Chart Samples
  • JSP Chart Samples
  • Spring MVC Chart Samples
  • Dashboard Samples
  • JavaScript StockChart Samples

Example shows Python Bubble Chart in dark theme. Library provides options to customize the look & feel of the charts to match your application. Demo also includes Django source-code that you can try running locally.

  • Template
  • View
<!-- index.html -->
{% load static %}
<html>
<head>
<title>CanvasJS Python Charts</title>
<script>
  window.onload = function () {
    var chart = new CanvasJS.Chart("chartContainer", {
      animationEnabled: true,
      zoomEnabled: true,
      exportEnabled: true,
      theme: "dark2",
      title:{
        text: "Employment in Agriculture vs Agri-Land"
      },
      axisX: {
        title:"Employment in Agriculture",
        suffix: "%",
        minimum: 0,
        maximum: 61,
        gridThickness: 1
      },
      axisY:{
        title: "Land in Million Sq.km",
        suffix: "mn"
      },
      legend: {
        horizontalAlign: "right"
      },
      data: [{
        type: "bubble",
        showInLegend: true,
        legendText: "Size of Bubble Represents Population",
        toolTipContent: "<b>{name}</b><br/>Employment: {x}% <br/> Agri-Land: {y}mn sq. km<br/> Population: {z}mn",
        dataPoints: {{ employment_agriculture_data|safe }}
      }]
    });
    chart.render();
  }
</script>
</head>
<body>
    <div id="chartContainer" style="width: 100%; height: 360px;"></div>
    <script src="{% static 'canvasjs.min.js' %}"></script>
</body>
</html>                              
from django.shortcuts import render

def index(request):
    employment_agriculture_data = [
        { "x": 39.6, "y": 5.225, "z":1347, "name":"China" },
        { "x": 3.3, "y": 4.17, "z":21.49, "name":"Australia" },
        { "x": 1.5, "y": 4.043, "z":304.09, "name":"US" },
        { "x": 17.4, "y": 2.647, "z":2.64, "name":"Brazil" },
        { "x": 8.6, "y": 2.154, "z":141.95, "name":"Russia" },
        { "x": 52.98, "y": 1.797, "z":1190.86, "name":"India" },
        { "x": 4.3, "y": 1.735, "z":26.16, "name":"Saudi Arabia" },
        { "x": 1.21, "y": 1.41, "z":39.71, "name":"Argentina" },
        { "x": 5.7, "y": .993, "z":48.79, "name":"SA" },
        { "x": 13.1, "y": 1.02, "z":110.42, "name":"Mexico" },
        { "x": 2.4, "y": .676, "z":33.31, "name":"Canada" },
        { "x": 2.8, "y": .293, "z":64.37, "name":"France" },
        { "x": 3.8, "y": .46, "z":127.70, "name":"Japan" },
        { "x": 40.3, "y": .52, "z":234.95, "name":"Indonesia" },
        { "x": 42.3, "y": .197, "z":68.26, "name":"Thailand" },
        { "x": 31.6, "y": .35, "z":78.12, "name":"Egypt" },
        { "x": 1.1, "y": .176, "z":61.39, "name":"U.K" },
        { "x": 3.7, "y": .144, "z":59.83, "name":"Italy" },
        { "x": 1.8, "y": .169, "z":82.11, "name":"Germany" }
    ]

    return render(request, 'index.html', { "employment_agriculture_data" : employment_agriculture_data })                        

Chart Customizations

You can add custom set of colors to the chart by setting colorSet property. Color of chart elements like title, axis-line, grids, markers can be changed using fontColor, lineColor, gridColor & markerColor respectively.

Quick Links

  • Chart Docs
  • StockChart Docs
  • About Us
  • FAQs

Server Side Technologies

  • ASP.NET MVC Charts
  • PHP Charts
  • JSP Charts
  • Spring MVC Charts

Front Side Technologies

  • JavaScript Charts
  • jQuery Charts
  • React Charts
  • Angular Charts
  • JavaScript StockCharts

Contact

  • Fenopix, Inc.
  • 2093 Philadelphia Pike,
  • #5678, Claymont,
  • Delaware 19703
  • United States Of America

©2025 Fenopix Privacy Policy Cookies Policy Careers