• 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 Multi Series Spline Area Chart using Django

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

Python Multi Series Spline Area Chart lets you compare two or more dataseries in a single graph. Below example shows multi-series spline area chart along with 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, 
          exportEnabled: true, 
          theme: "light2",
          title: {
            text: "Annual Expenses"
          },
          axisY: {
            prefix: "$",
            labelFormatter: addSymbols
          },
          toolTip: {
            shared: true,
            content: "<span style='\"'color: {color};'\"'><strong>{name}</strong></span>: <span style='\"'color: dimgrey;'\"'>${y}</span>"
          },
          legend: {
            fontSize: 13,
            cursor: "pointer",
            itemclick: hideUnhideDataSeries
          },
          data: [
            {        
              type: "splineArea", 
              showInLegend: true,
              name: "Salaries",
              markerSize: 0,
              xValueType: "dateTime",
              dataPoints: {{ salaries_data|safe }}
            },
            {        
              type: "splineArea", 
              showInLegend: true,
              name: "Office Cost",
              markerSize: 0,
              xValueType: "dateTime",
              dataPoints: {{ office_cost_data|safe }}
            },
            {        
              type: "splineArea", 
              showInLegend: true,
              name: "Entertainment",
              markerSize: 0,
              xValueType: "dateTime",      
              dataPoints: {{ entertainment_data|safe }}
            },
            {        
              type: "splineArea", 
              showInLegend: true,       
              name: "Maintenance",
              markerSize: 0,
              xValueType: "dateTime",
              dataPoints: {{ maintainance_data|safe }}
            }
          ]
        });
        chart.render();


        function addSymbols(e){
          var suffixes = ["", "K", "M", "B"];
          var order = Math.max(Math.floor(Math.log(Math.abs(e.value)) / Math.log(1000)), 0);
          if(order > suffixes.length - 1)
            order = suffixes.length - 1;
          var suffix = suffixes[order];
          return CanvasJS.formatNumber(e.value / Math.pow(1000, order)) + suffix;
        }

        function hideUnhideDataSeries(e) {
          if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
            e.dataSeries.visible = false;
          } else {
            e.dataSeries.visible = true;
          }

          e.chart.render();
        }
    }
</script>
</head>
<body>
    <div id="chartContainer" style="height: 360px; width: 100%;"></div>
    <script src="{% static 'canvasjs.min.js' %}"></script>
</body>
</html>                              
from django.shortcuts import render

def index(request):
    salaries_data = [
        { "x": 1609439400000, "y": 3000000 },
        { "x": 1612117800000, "y": 3500000 },
        { "x": 1614537000000,"y": 3000000 },
        { "x": 1617215400000, "y": 3040000 },
        { "x": 1619807400000, "y": 2090000 },
        { "x": 1622485800000, "y": 3100000 },
        { "x": 1625077800000, "y": 3020000 },
        { "x": 1627756200000, "y": 3000000 },
        { "x": 1630434600000, "y": 3300000 },
        { "x": 1633026600000, "y": 3800000 },
        { "x": 1635705000000, "y": 3890000 },
        { "x": 1638297000000, "y": 3900000 }
    ]

    office_cost_data = [
        { "x": 1609439400000, "y": 2010000 },
        { "x": 1612117800000, "y": 1600000 },
        { "x": 1614537000000, "y": 1400000 },
        { "x": 1617215400000, "y": 1800000 },
        { "x": 1619807400000, "y": 1800000 },
        { "x": 1622485800000, "y": 2100000 },
        { "x": 1625077800000, "y": 2200000 },
        { "x": 1627756200000, "y": 2500000 },
        { "x": 1630434600000, "y": 2300000 },
        { "x": 1633026600000, "y": 2500000 },
        { "x": 1635705000000, "y": 2600000 },
        { "x": 1638297000000, "y": 2500000 }
    ]

    entertainment_data = [
        { "x": 1609439400000, "y": 1010000 },
        { "x": 1612117800000, "y": 600000 },
        { "x": 1614537000000, "y": 340000 },
        { "x": 1617215400000, "y": 400000 },
        { "x": 1619807400000, "y": 900000 },
        { "x": 1622485800000, "y": 390000 },
        { "x": 1625077800000, "y": 420000 },
        { "x": 1627756200000, "y": 500000 },
        { "x": 1630434600000, "y": 1430000 },
        { "x": 1633026600000, "y": 1230000 },
        { "x": 1635705000000, "y": 830000 },
        { "x": 1638297000000, "y": 630000 }
    ]

    maintainance_data = [
        { "x": 1609439400000, "y": 170000 },
        { "x": 1612117800000, "y": 260000 },
        { "x": 1614537000000, "y": 100000 },
        { "x": 1617215400000, "y": 140000 },
        { "x": 1619807400000, "y": 90000 },
        { "x": 1622485800000, "y": 100000 },
        { "x": 1625077800000, "y": 120000 },
        { "x": 1627756200000, "y": 500000 },
        { "x": 1630434600000, "y": 130000 },
        { "x": 1633026600000, "y": 230000 },
        { "x": 1635705000000, "y": 280000 },
        { "x": 1638297000000, "y": 130000 }
    ]

    return render(request, 'index.html', { "salaries_data" : salaries_data, "office_cost_data" : office_cost_data, "entertainment_data": entertainment_data, "maintainance_data": maintainance_data})                        

Chart Customizations

Legends can be enabled for different dataseries by setting showInLegend to true. Color & type of the legend-marker can be changed using legendMarkerColor & legendMarkerType properties.

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