Jesse
Jesse

Reputation: 1723

Modify data through chart manipulation

Are there any charting libraries for the web that allow the user to manipulate the chart and update the backing data cleanly?

My idea of how it would work:

  1. The chart definition is passed to the charting library
  2. The chart is rendered on the webpage
  3. The user modifies the chart(ie. add a point, drag a column)
  4. The chart definition is sent back to the web server (ajax call), which then updates the data model

For example, I'd like to be able to drag any one of these stacked columns and update the backing json.

Partial Initial Chart Definition

seriesA: [
         {
        data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2]
            }]

Partial Modified Chart Definition ( Note the difference in the first data point)

seriesA: [
         {
        data: [130.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2]
            }]

It seems possible to implement this through highcharts api: Google Line Chart: drag to adjust value but I'm curious if there are any charting solutions that have a cleaner API for this.

Upvotes: 0

Views: 271

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

Actual options in general are available at chart.options, see example with draggable plugin: http://jsfiddle.net/AyUbx/767/

Upvotes: 1

Related Questions