Custom Query (18300 matches)
Results (139 - 141 of 18300)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#12457 | fixed | console.log left over on XmlStore source | ||
Description |
A appears on the browser debug console, with dojo 1.6 distribution source. The affecting line of code is on XmlStore.js, line 400: console.log("XmlStore._fetchItems(): url=" + url); |
|||
#13807 | patchwelcome | Implementing "value" feature from dojox.charting.DataSeries in dojox.charting.DataChart | ||
Description |
According to my current understanding of Dojo 1.6.1 code (and also a read of 1.7.0b5), dojox.charting.DataChart? has a "fieldName" constructor argument, which is used to extract the series value (or values if the property value is a array) from a datastore item, for example:
var field = this.getProperty(m, this.fieldName); this.seriesData[nm].push(field); Given a dataset in which the developer only wants some specific properties of an item plotted from a flat format, for example only 'cpu',
{ "identifier": "pid", "idAttribute": "pid", "label": "cmd", "labelAttribute": "cmd", "items": [ {"pid": 1639, "cmd": "kernel_task" , "cpu": 10.3 , "rsize": 659000000 , "vsize": 18000 , "vprvt": 81000 }, {"pid": 1572, "cmd": "iTerm" , "cpu": 10.0 , "rsize": 139400000 , "vsize": 9000 , "vprvt": 52000 }, {"pid": 1524, "cmd": "top" , "cpu": 7.7 , "rsize": 350000000 , "vsize": 46000 , "vprvt": 17000 }, {"pid": 1470, "cmd": "launchd" , "cpu": 15.4 , "rsize": 186800000 , "vsize": 50000 , "vprvt": 57000 }, {"pid": 1823, "cmd": "Colloquy" , "cpu": 5.2 , "rsize": 116000000 , "vsize": 6873000 , "vprvt": 226000 }, {"pid": 1442, "cmd": "WindowServer" , "cpu": 4.5 , "rsize": 157000000 , "vsize": 2525000 , "vprvt": 328000 }, {"pid": 1340, "cmd": "iTunes" , "cpu": 3.8 , "rsize": 700000000 , "vsize": 3293000 , "vprvt": 81000 }, {"pid": 1556, "cmd": "backupd" , "cpu": 3.4 , "rsize": 150000000 , "vsize": 2555000 , "vprvt": 57000 }, {"pid": 1363, "cmd": "Finder" , "cpu": 2.7 , "rsize": 600000000 , "vsize": 2667000 , "vprvt": 81000 }, {"pid": 1329, "cmd": "mdworker" , "cpu": 2.3 , "rsize": 100000000 , "vsize": 2416000 , "vprvt": 36000 } ] } it's currently not possible to only plot a subset of the properties using dojox.charting.DataChart? directly or pre-processing the data (as far as i know). A possible solution could be to mimic dojox.charting.DataSeries?, in which it's "value" property:
can be passed a function which receives the datastore item and returns a transformation, for example as described in the Dojo docs: function trans1(store, item){ // let's create our object var o = { x: store.getValue(item, "order"), y: store.getValue(item, "value"), tooltip: store.getValue(item, "title"), color: store.getValue(item, "urgency") ? "red" : "green" }; // we can massage the object, if we want, and return it return o; } In this particular case, an implementation could be: function trans_subset(store, item){ // let's create our object var o = { "cpu": store.getValue(item, "cpu"), "rsize": store.getValue(item, "rsize"), "vsize": store.getValue(item, "vsize"), "vprvt": store.getValue(item, "vprvt"), }; // we can massage the object, if we want, and return it return o; } Although it it more complex that for example allowing "fieldName" to be an array of property names (that could be another possible solution), this solution would also allow the developer to transform the property values, as also intented on the dojox.charting.DataSeries? "value", for example: /** * function that normalizes Kb/Mb/Gb bytes to bytes */ function normalizeToBytes(/*String*/ value) { //TODO do me } function trans_subset(store, item){ var o = { "cpu": store.getValue(item, "cpu"), "rsize": normalizeToBytes(store.getValue(item, "rsize")), "vsize": normalizeToBytes(store.getValue(item, "vsize")), "vprvt": normalizeToBytes(store.getValue(item, "vprvt")), }; return o; } |
|||
#14526 | fixed | Tooltips do not position correctly on charts after scroll | ||
Description |
Steps to reproduce the problem.
The tooltip will remain in the original position. Expected Behavior: The tooltip should appear lower on the page not in the original position. This was introduced due to ticket #12392 around line 141 in Tooltip.js when this change occurred: var lt = dojo.coords(this.chart.node, true); to var lt = this.chart.getCoords(); |