npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

simpledimple

v1.1.1

Published

Dimple-js Simplified

Downloads

4

Readme

npm tests license

Simpledimple.js

Simpledimple.js is an opensource lightweight JavaScript wrapper and extension API for dimple. Simpledimple.js is originally written by Nagarajan Chinnasamy at Mindtree.

dimple is a simply powerful object-oriented API for business analytics powered by D3.js.

What does it do?

Simpledimple.js

* Separates the configuration of properties of charts from JavaScript code
* Facilitates externalization of the parameters of a chart thus opening the possibilities of:
    * Interactive tools based designing of charts
    * External storage and
    * Exchange of charts
* Extends dimple library to make externalized chart configuration more self contained    

This wrapper API accepts the entire configuration of a chart (E.g., parameters of axis, series etc.) as a single JavaScript object and internally handles the calls to be made to dimple. Following is an example chart configuration:

var chartConfig = {
    bounds: {
        x: 70,
        y: 30,
        width: 505,
        height: 305
    },
    axes: [{
        position: "x",
        categoryFields: "Month",
        orderRules: [{ ordering: "Date" }]
    }, {
        position: "y",
        measure: "Unit Sales"
    }],
    series: [{
        plot: "area",
        interpolation: "step",
        lineWeight: 1
    }]
};

To create a chart, you use new simpledimple.chart passing the chart configuration and data. Then, invoke draw() function on the newly created chart object to draw the chart:

var svg = dimple.newSvg("#chartContainer", 590, 400);
var myChart = new simpledimple.chart(svg, chartConfig, data);
myChart.draw();

Documentation?

Please refer to the Wiki for documentation.

How do I load the code?

Simpledimple.js implements the Universal Module Definition (UMD) pattern and so should be compatible with most approaches to script loading and dependency management: direct script loading with RequireJS, Browserify etc. For these options, you can grab it from NPM with npm install simpledimple or via Bower with bower install simpledimple.

If you are loading the scripts directly (as in the examples), you need to:

  1. Load the dependencies:
  2. d3 - <script src="https://d3js.org/d3.v3.min.js"></script>
  3. dimple - <script src="http://dimplejs.org/dist/dimple.v2.2.0.min.js"></script>
  4. Load the simpledimple.js files:
  5. simpledimple.min.js

Here is the source code of an exmaple

Where can I see the demo?

You can see the live demo at examples page.

Is there an online tool to experiment and design my own charts?

Yes. You can use the fiddle tool to:

* Load sample or your own data
* Browse and load sample chart configuration and edit
* Verify and create your own charts

How can I build the code and run the tests?

Install grunt and bower using:

npm install -g grunt
npm install -g bower

To install the development dependencies, just run:

npm install
bower install

which will create node_modules and bower_components folders with the files required to run the Grunt build system.

After modifying any of the .js files at the top of the repo, you can compile/minify the files into the dist directory by running

grunt

This also starts a webserver bound to port 3001 that can be used to browse simpledimple home page that has links to examples and fiddle application. Browse the URL: http://localhost:3001/

To run the tests, use:

grunt test

How can I contribute?

Pull requests are welcome! Here are some Contribution Guidelines.

I have a question, how can I get in touch?

Please first check the issues that are already raised and if you can't find what you're looking for there, then please create a GitHub Issue. When creating an issue, please try to provide a replicable test case so that others can more easily help you.

Copyright & Licence (MIT License)

Simpledimple.js is © 2016 Nagarajan Chinnasamy, Mindtree, other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.