Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Global Property Values #65

Open
curran opened this issue Dec 9, 2015 · 0 comments
Open

Support Global Property Values #65

curran opened this issue Dec 9, 2015 · 0 comments

Comments

@curran
Copy link
Collaborator

curran commented Dec 9, 2015

In this example , the following configuration is repeated over and over for each chart:

        "xAxisLabelTextOffset": xAxisLabelTextOffset,
        "yAxisLabelTextOffset": yAxisLabelTextOffset,
        "margin": margin

This is ugly. There needs to be a solution for sharing certain properties across all component instances. Perhaps a new component called "chiasm-globals" can be created that will propagate certain property values to all other component instances within the application. Configuration might look like this:

    "myGlobals": {
      "plugin": "globals",
      "state": {
        "properties": {
          "xAxisLabelTextOffset": 40,
          "yAxisLabelTextOffset": 50,
          "margin": { top: 10, right: 10, bottom: 50, left: 80 }
        }
      }
    },

Since it only makes sense to apply these properties to visualization components, perhaps a blacklist can be included in the configuration, like this:

    "myGlobals": {
      "plugin": "globals",
      "state": {
        "properties": {
          "xAxisLabelTextOffset": 40,
          "yAxisLabelTextOffset": 50,
          "margin": { top: 10, right: 10, bottom: 50, left: 80 }
        },
        "except": ["myLinks", "myLoader", "myVisWithUniqueCustomSettings"]
      }
    },

As another alternative, maybe this functionality could be added to https://github.com/chiasm-project/chiasm-links using a new DSL expression like this:

"links": {
  "plugin": "links",
  "state": {
    "bindings": [
      "vis1.xAxisLabelTextOffset -> *.xAxisLabelTextOffset"
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant