Interactive Javascript Chart for Data Visualziations

Overview

Forio Contour

Interactive Javascript Chart for Data Visualziations

Forio Contour provides a core set of common visualizations that you can see in the gallery, and it's easy to extend if you want to add your own customizations. Plus, it's free and open source.

Forio Contour uses the popular D3 engine and adds a set of intuitive abstractions so you can easily create graphs and charts.

Want to learn more? goto Forio Contour

Comments
  • Multi scale axis (-- extends right-y-axis)

    Multi scale axis (-- extends right-y-axis)

    This fork is a branch which is on top of the right-y-axis branch. This means it adds everything that the right-y-axis branch does PLUS a new axis type (multiscaling linear y axis).

    This new axis is used to represent multiple scales on the same axis. Both this and the right-y-axis feature are coded in such a way as to not affect any existing deployments unless they choose to use the new features.

    Jaime -- if you would like I would be happy to walk you through these changes, how to configure the new chart types, and what the new chart types look like (and do)

    opened by wasbridge 13
  • Use es6 modules and webpack in prep for NPM publish

    Use es6 modules and webpack in prep for NPM publish

    A lot of changes. I tried to do the messy change of removing and re-indenting files on the first commit and then fixes on the following commits to make it a bit easier to see, but it is still hard to see the changes :(

    opened by jaimedp 11
  • Materialize configuration options parameters that are functions.

    Materialize configuration options parameters that are functions.

    This allows to specify any configuration option as a function. This functions will be called just before the rendering starts. Some functions are not "materialized" as they expect to be called with some data within the context of the render cycle for example data formatters expect to be called for each point in the data set. These functions are not materialized before the render starts and are called in the context of the specific visualization.

    opened by jaimedp 10
  • chart.setData(data).render() broken

    chart.setData(data).render() broken

    Changing data and re-rendering causes ticks to break, Error: Invalid value for <g> attribute transform="translate(0,NaN)"

    I'm using a grouped bar chart as in this fiddle: http://jsfiddle.net/gh/get/jquery/1.11.0/forio/contour/tree/master/examples/showcase/bar/bar-grouped

    To reproduce, modify the fiddle to call setData and render like so:

    chart = new Contour({
        ...
    })
    .cartesian()
    .horizontal()
    .bar(data)
    .legend(data)
    .tooltip()
    .render();
    
    chart.setData(data).render();  // just  re-rendering using the original data, nothing funny here
    

    You'll see the most of the ticks disappear...

    verified 
    opened by WestleyArgentum 8
  • Detach nw utilities from _

    Detach nw utilities from _

    Contour relies on lodash being on the global namespace which it then alters to add utility functions. Requiring lodash in other app modules would reset lodash breaking future instances of Contour. Found that putting utilitities in own namespace nw resolves this issue.

    Future We should still consider:

    • not relying on libraries in global space.
    • registering forio-contour with npm
    opened by breadbaker 7
  • Update contour-utils.js normalizeSeries to do filtering

    Update contour-utils.js normalizeSeries to do filtering

    Filter data to a desired num pts (configurable with new data object ({filter:true, filterNumPts:1000}))

    Always keeps first/last -- and then for all the ones in the middle it grabs the high/low per interval

    opened by wasbridge 7
  • yAxis:tickValues receive function

    yAxis:tickValues receive function

    For issue #252 - allow user to pass in function to yAxis:tickValues parameter. See the following jsfiddle for usage - http://jsfiddle.net/a5L7x0c5/6/.

    opened by parikhshiv 6
  • rename _.nw

    rename _.nw

    this pr was opened a year ago:

    https://github.com/forio/contour/pull/237

    relying on _ not to be touched is dangerous and its breaks in my use case.

    can we rename nwUtils to avoid this conflict or suggest a better path forward.

    we want to continue to use contour, and not have to work on a stale version nor constantly have to merge diverged branches.

    opened by breadbaker 5
  • add distanceX and distanceY to tooltip

    add distanceX and distanceY to tooltip

    • distanceX and distanceY, if given overrides the distance option.
    • change clampPosition to the edge and not opposite. ie. if you go distanceY = 400 it will max out on the top of the graph.

    Demo: http://jsfiddle.net/ucstdgsa/

    opened by senluchen2015 5
  • Centered axis

    Centered axis

    Add new centeredAxis option for y-axis - focus is on dynamically centering y axis around data. Unlike default axis scaling, this option ignores the zeroAnchor option (meaning that the y axis will not be anchored at zero by default).

    This PR also includes the changes from branch y-axis-scaling.

    Here is a jsfiddle that illustrates the use of the centeredAxis option - http://jsfiddle.net/a5L7x0c5/1/

    opened by parikhshiv 5
  • upgrade lodash to 4.17.2

    upgrade lodash to 4.17.2

    For #217 - upgrading to latest version of lodash (4.17.2). The following functions have changed since lodash 2.4.2 (changes are visible in https://lodash.com/docs/3.10.1):

    _.all -> _.every _.any -> _.some _.contains -> _.includes _.invoke -> _.invokeMap _.pluck -> _.map _.select -> _.filter _.unique -> _.uniq

    Also, the 'this' argument (3rd parameter) has been removed from most methods - from docs: Removed thisArg params from most methods because they were largely unused, complicated implementations, & can be tackled with _.bind, Function#bind, or arrow functions.

    In this PR, I've replaced all instances of the above functions which are out of date, and tried to address every instance of the thisArg being used (by replacing it with Function#bind) - possible that I missed some, but unlikely - I've tested a basic line graph locally to sanity check.

    opened by parikhshiv 5
  • Bump lodash from 4.17.2 to 4.17.19

    Bump lodash from 4.17.2 to 4.17.19

    Bumps lodash from 4.17.2 to 4.17.19.

    Release notes

    Sourced from lodash's releases.

    4.17.16

    Commits
    Maintainer changes

    This version was pushed to npm by mathias, a new releaser for lodash since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Y-axis tick values are not always nicely generated

    Y-axis tick values are not always nicely generated

    yAxis tick value generation uses a niceTicks function that seems to generate some not so nice ticks on certain datasets:

    _.nw.niceTicks(-16575919.58, 0, undefined)
    //  creates [-16575919.6, -12575919.6, -8575919.6, -4575919.6, -575919.6, 3424080.4]
    

    Found while testing with data set: [-16575919.58, 0, 0, 0]

    opened by lukwallace 1
  • Dynamically generated left padding for axis ticks are not always accurate

    Dynamically generated left padding for axis ticks are not always accurate

    Reference in code, using Y-Axis as example:

    The spacing calculated for the left padding:

    _getAdjustedLeftPadding: function(options) {
        var yDomainScaled = this._getYScaledDomain(this.yDomain, this.options);
        var tmpScale = d3.scale.linear().domain(yDomainScaled);
        var yLabels = tmpScale.ticks(options.ticks);
        var format = options.labels.formatter || d3.format(options.labels.format || ",.0f");
        var yAxisText = _.map(yLabels, format).join("<br>");
        var yLabelBounds = _.nw.textBounds(yAxisText, ".y.axis");
        return maxTickSize(this.options.yAxis) + (this.options.yAxis.tickPadding || 0) + yLabelBounds.width;
    },
    

    ^ Uses tmpScale.ticks(options.ticks) to generate approximated tick values for spacing calculation

    The actual tick value calculation for the y-axis:

    axis: function() {
        /*jshint eqnull:true */
        var options = this.options.yAxis;
        var domain = this.domain;
        var dMin = options.min != null ? options.min : options.zeroAnchor ? Math.min(0, domain[0]) : domain[0];
        var dMax = options.max != null ? options.max : domain[1];
        var tickValues = options.tickValues || _.nw.niceTicks(dMin, dMax, options.ticks);
        var numTicks = this.numTicks(domain, options.min, options.max);
        var format = options.labels.formatter || d3.format(options.labels.format);
        return d3.svg.axis().scale(this._scale).tickFormat(format).tickSize(options.innerTickSize, options.outerTickSize).tickPadding(options.tickPadding).ticks(numTicks).tickValues(tickValues);
    },
    

    ^ Uses options.tickValues || _.nw.niceTicks(dMin, dMax, options.ticks); to generate the actual tick values to be rendered.

    This will occasionally cause the the ticks labels to be rendered with an inaccurate amount of space for them. We managed to produce this issue with a standard column chart using the data: [{"x":"AGM","y":12.125990845966125},{"x":"Supercapacitor","y":-12.39133198369404}]

    opened by lukwallace 1
  • Tooltips do not account for `offset` (Bar/Column Charts)

    Tooltips do not account for `offset` (Bar/Column Charts)

    Setting offset in the options for the chart will display the bar/column correctly, however the tooltip will still render in the position it would be if the bar/column was not offset.

    {
        ...options,
        column: {
            offset: 20,
        }
    }
    

    Column without offset: col-without-offset

    Column with offset: col-with-offset

    opened by hkumar1993 0
  • Tooltip shows incorrect text on scatter plots with similar points

    Tooltip shows incorrect text on scatter plots with similar points

    Only occurs for charts with points that have the same X and Y values (but differing Z). The tooltip calls a findOriginalDataPoint function which finds the first point that has the matching x and y, and uses that point to generate the tooltip text message; points with the same x and y values but different Z, or other values will not be correctly picked up.

    Snippet from contour.js

                function findOriginalDataPoint(d) {
                    var res = [];
                    _.each(data, function(series, seriesIndex) {
                        var name = series.name;
                        _.each(series.data, function(point) {
                            if (point.x === d.x && d.y === point.y) {
                                res.push(_.extend(point, {
                                    series: name,
                                    seriesIndex: seriesIndex
                                }));
                            }
                        });
                    });
                    return res;
                }
    
    opened by lukwallace 0
Releases(v0.9.89)
Owner
Forio
Forio
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A simple interactive web page for your Gantt Chart (build with Vue.js)

Web Gantt A simple interactive web page for your Gantt Chart (build with Vue.js) No dependency required, no command line, just download the repo and l

Julie Blanc 4 Mar 22, 2022
Interactive To Do List, draggable tasks, optimized for desktop and mobile screen sizes. It reserves data in local storage. Built with HTML, CSS, and JavaScript.

To Do List Interactive daily To-Do List Built With Major languages: html, css, javascript Frameworks: Technologies used: Webpack Live Demo Live Demo L

Jafar Yousef 6 Aug 4, 2022
A lightweight JavaScript library for creating interactive maps and pretty data visualization.

Jsvectormap A lightweight Javascript library for creating interactive maps and pretty data visualization. Explore docs . Report bug · View demo · Down

Mustafa Omar 204 Dec 24, 2022
Diagram-maker - A library to display an interactive editor for any graph-like data.

Diagram Maker Diagram Maker is a library to display an interactive editor for any graph-like data. Following is a screenshot from one of the consumers

Amazon Web Services - Labs 2.3k Dec 27, 2022
JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

Aykut Saraç 20.6k Jan 4, 2023
It shows an effective way to correct bus arrival information using data analytics based on Amazon Serverless such as Kiness Data Stream, Kinesis Data Firehose, S3, and Lambda.

Amazon Serverless를 이용한 실시간 버스 정보 수집 및 저장 본 github repository는 버스 정보를 주기적으로 수집하여 분석할 수 있도록, Amazon Serverless인 Amazon Kinesis Data Stream, Kinesis Data

John Park 4 Nov 13, 2022
A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

Mantine DataTable A "dark-theme aware" table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagina

Ionut-Cristian Florescu 331 Jan 4, 2023
Tool to sign data with a Cardano-Secret-Key // verify data with a Cardano-Public-Key // generate CIP-8 & CIP-36 data

Tool to sign data with a Cardano-Secret-Key // verify data with a Cardano-Public-Key // generate CIP-8 & CIP-36 data

Martin Lang 11 Dec 21, 2022
Simple yet flexible charting Lightning Web Component using Chart.js for admins & developers

Lightning Web Chart.js Component Simple yet flexible charting Lightning Web Component using Chart.js for admins & developers Documentation Getting sta

@SalesforceLabs 109 Dec 9, 2022
A Hackable Markdown Note Application for Programmers. Version control, AI completion, mind map, documents encryption, code snippet running, integrated terminal, chart embedding, HTML applets, plug-in, and macro replacement.

Yank Note A hackable markdown note application for programmers Download | Try it Online >>> Not ecommended English | 中文说明 [toc]{level: [2]} Highlights

洋子 4.3k Dec 31, 2022
a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive

JSTable The JSTable is a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive. The plugin is similar to the jQuery data

null 63 Oct 20, 2022
curtains.js is a lightweight vanilla WebGL javascript library that turns HTML DOM elements into interactive textured planes.

What is it ? Shaders are the new front-end web developpment big thing, with the ability to create very powerful 3D interactions and animations. A lot

Martin Laxenaire 1.4k Jan 1, 2023
"Awesome books" is a simple website that displays a list of books and allows you to add and remove books from that list. By building this application with JavaScript, the website is more interactive!

Awesome-books Description "Awesome books" is a simple website that displays a list of books and allows you to add and remove books from that list. By

Cindy Dorantes 11 Oct 18, 2022
A JavaScript library providing interactive lists

ListExtender.js https://www.julienbl.me/ListExtender/ Install Static (recommended) <script defer type="text/javascript" src="https://www.julienb

Julien Bertazzo Lambert 10 Oct 31, 2022
Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.

Jspreadsheet CE v4: The JavaScript spreadsheet Jexcel CE has been renamed to Jspreadsheet CE News Important: Please import jspreadsheet.css (jexcel.cs

null 6.2k Dec 19, 2022
The JSTable is a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive

The JSTable is a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive. The plugin is similar to the jQuery data

null 63 Oct 20, 2022