Coder Social home page Coder Social logo

Comments (11)

christabor avatar christabor commented on May 28, 2024

You can use the example format, or click "override" and then pass in the full config that you would normally pass c3 (excluding any JavaScript, as it must be json serialize-able).

from flask_jsondash.

bholagabbar avatar bholagabbar commented on May 28, 2024

@christabor I following this https://stackoverflow.com/a/32950521/4258892 and here is my configuration

@cross_origin()
@app.route('/c3ts')
def c3ts():

    data = dict(
        x='x',
        xFormat='%Y%m%d',
        columns=[
            ['x', '20130101', '20130102', '20130103', '20130104', '20130105', '20130106'],
            ['data1', 30, 200, 100, 400, 150, 2],
            ['data2', 130, 340, 200, 500, 250, 350]
        ]
    )

    return jsonify(dict(data=data))

This just doesn't seem to work. When I input the data endpoint for creating the chart, the preview is correct (because it is correct json) but the chart just keeps rendering with the circle...what exactly is the issue here?

from flask_jsondash.

bholagabbar avatar bholagabbar commented on May 28, 2024

@christabor awaiting your reply!

from flask_jsondash.

christabor avatar christabor commented on May 28, 2024

I'll take a look today. Is the above example representative of your entire payload configuration?

from flask_jsondash.

bholagabbar avatar bholagabbar commented on May 28, 2024

from flask_jsondash.

christabor avatar christabor commented on May 28, 2024

I used your example and was able to get it running with no problem. Here's my configuration:

{
    "username": "anonymous",
    "category": "uncategorized",
    "layout": "grid",
    "name": "asdsad",
    "modules": [
        {
            "name": "c3ts",
            "family": "C3",
            "refresh": false,
            "height": 600,
            "width": "col-8",
            "classes": [],
            "dataSource": "http://0.0.0.0:5004/c3ts",
            "override": true,
            "refreshInterval": null,
            "guid": "f8f78659-4d63-61e4-e2cc-ffa2640a950f",
            "type": "timeseries",
            "order": 0,
            "row": 1
        }
    ],
    "created_by": "anonymous",
    "date": "2018-03-16 23:13:21.005435",
    "id": "179a0357-29aa-11e8-ac1e-a0999b0aebbf"
}

screen shot 2018-03-16 at 11 14 23 pm

from flask_jsondash.

christabor avatar christabor commented on May 28, 2024

Make sure to check "use custom configuration" in the config. See the screenshot.

screen shot 2018-03-16 at 11 15 51 pm

from flask_jsondash.

bholagabbar avatar bholagabbar commented on May 28, 2024

from flask_jsondash.

christabor avatar christabor commented on May 28, 2024

Config.dataSource is the key used in your config that points to the url serving that data you referenced. Everything you chose should be the same, except the custom override option.

from flask_jsondash.

bholagabbar avatar bholagabbar commented on May 28, 2024

@christabor Ah perfect, I was only missing checking the 'use custom config button'. Thanks a ton for your help. Cheers!

from flask_jsondash.

christabor avatar christabor commented on May 28, 2024

Good to hear!

from flask_jsondash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.