chart2music
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -98,3 +98,6 @@ interface AudioEngine { | ||
private _type; | ||
private _explicitAxes; | ||
constructor(input: SonifyTypes); | ||
_generateSummary(): void; | ||
setData(data: SonifyTypes["data"], axes?: SonifyTypes["axes"]): void; | ||
setOptions(option: c2mOptions): void; | ||
@@ -113,3 +116,2 @@ getCurrent(): { | ||
private _initializeData; | ||
private _focusEvent; | ||
private _startListening; | ||
@@ -116,0 +118,0 @@ private _playAndSpeak; |
@@ -597,2 +597,3 @@ var c2mChart = (function (exports) { | ||
this._monitorMode = false; | ||
this._explicitAxes = {}; | ||
this._type = input.type; | ||
@@ -602,3 +603,2 @@ this._providedAudioEngine = input.audioEngine; | ||
this._chartElement = input.element; | ||
this._explicitAxes = input.axes ?? {}; | ||
if (!this._chartElement.hasAttribute("alt") && | ||
@@ -634,9 +634,23 @@ !this._chartElement.hasAttribute("aria-label")) { | ||
setData(data, axes) { | ||
this._explicitAxes = { | ||
x: { | ||
...(this._explicitAxes.x ?? {}), | ||
...(axes?.x ?? {}) | ||
}, | ||
y: { | ||
...(this._explicitAxes.y ?? {}), | ||
...(axes?.y ?? {}) | ||
}, | ||
y2: { | ||
...(this._explicitAxes.y2 ?? {}), | ||
...(axes?.y2 ?? {}) | ||
} | ||
}; | ||
this._initializeData(data); | ||
this._metadataByGroup = calculateMetadataByGroup(this._data); | ||
this._metadataByGroup = checkForNumberInput(this._metadataByGroup, data); | ||
this._xAxis = initializeAxis(this._data, "x", { ...this._explicitAxes.x, ...axes?.x }); | ||
this._yAxis = initializeAxis(this._data, "y", { ...this._explicitAxes.y, ...axes?.y }); | ||
this._xAxis = initializeAxis(this._data, "x", this._explicitAxes.x); | ||
this._yAxis = initializeAxis(this._data, "y", this._explicitAxes.y); | ||
if (usesAxis(this._data, "y2")) { | ||
this._y2Axis = initializeAxis(this._data, "y2", { ...this._explicitAxes.y2, ...axes?.y2 }); | ||
this._y2Axis = initializeAxis(this._data, "y2", this._explicitAxes.y2); | ||
} | ||
@@ -962,5 +976,2 @@ this._generateSummary(); | ||
this._chartElement.addEventListener("focus", () => { | ||
if (!context) { | ||
context = new AudioContext(); | ||
} | ||
if (this._options.live) { | ||
@@ -1136,2 +1147,5 @@ this._generateSummary(); | ||
_playDataPoint(current, statIndex, availableStats) { | ||
if (!context) { | ||
context = new AudioContext(); | ||
} | ||
if (!this._audioEngine && context) { | ||
@@ -1138,0 +1152,0 @@ this._audioEngine = |
{ | ||
"name": "chart2music", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"main": "dist/index.js", | ||
@@ -23,3 +23,3 @@ "module": "dist/index.mjs", | ||
], | ||
"homepage": "https://github.com/julianna-langston/chart2music#readme", | ||
"homepage": "https://www.chart2music.com", | ||
"repository": { | ||
@@ -32,2 +32,5 @@ "type": "git", | ||
}, | ||
"engines": { | ||
"node": ">16.14" | ||
}, | ||
"scripts": { | ||
@@ -65,2 +68,4 @@ "build": "rollup -c rollup.config.js --silent", | ||
"rimraf": "^3.0.2", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"rollup": "^2.77.0", | ||
@@ -67,0 +72,0 @@ "rollup-plugin-delete": "^2.0.0", |
@@ -51,1 +51,12 @@ # Chart2Music | ||
* [Bar-line plot](https://codepen.io/chart2music/full/QWmdpOJ). | ||
You can also find examples of integrations with other visualization libraries: | ||
* [with Chart.js](https://codepen.io/chart2music/pen/YzaVxPK) | ||
* [with D3.js](https://codepen.io/chart2music/full/gOezOaY) | ||
* [with Google Charts](https://codepen.io/chart2music/full/abYGoBJ) | ||
* [with AnyChart](https://codepen.io/chart2music/full/abYGoME) | ||
* [with Chartist.js](https://codepen.io/chart2music/full/LYdmPNj) | ||
* [with NVD3.js](https://codepen.io/chart2music/full/jOzxNQW) | ||
* [with Plotly.js](https://codepen.io/chart2music/full/BarrXYr) | ||
* [with Morris.js](https://codepen.io/chart2music/full/abYGobm) | ||
* [with Frappe](https://codepen.io/chart2music/full/QWmrWWE) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62
116064
25
17
2779