Script should be installed as package, using the package manager at the SMP Configuration window. Old method is still supported anyway.
REQUIRES SMP OR JSPLITTER
Download below clicking at '[...]-package.zip'. Check installation instructions here.
See full changelog here.
2.3.0 - 2025-12-12
Added
- Data: is now possible to create 3D charts with the Y-axis 'Listens (range)' option, along any X-axis and Z-axis TF (except a case mentioned below). It should calculate the playcounts for the given time range for each Z-group. Previously it simply displayed no data in these cases.
- Data: new menu entry to set custom TF expressions for data aggregation.
- Drag n' drop: added drag n' drop support, which allows to send selection to the chart to draw statistics for these tracks (replacing any previously set source). Additionally, there is a new source mode called 'Manual' which only reacts to drag n' drop or tracks sent by other panels. Note drag n' dropping any track when any other source is set will -temporarily- replace the current source (until it gets updated by any other condition), but once tracks have been dropped you can continue adding new ones (pressing Ctrl.) or replace the previous ones (default).
- External integration: added external integration via window.NotifyOthers(callback, arg) with other scripts. Window arg property should be an array with desired target panel names. All panels execute the action if it is not provided, otherwise only the matching panels. Chart arg follows the same behaviour for for panel with multiple charts (by Title). Note panel notifications only work within the same JS host component (i.e. no SMP <-> JSplitter). Currently available callbacks (name -> arg): [new]
- 'Timeline-SMP: add tracks' -> { window?: string[], chart?: string[], bAdd?: boolean, handleList: FbMetadbHandleList }, like drag n' drop, to temporarily set the source to given tracks. bAdd indicates whether to add or replace previous tracks. Note this source change is never saved between panel reloads.
- 'Timeline-SMP: refresh data' -> { window?: string[], chart?: string[] }, Equivalent to 'Settings/Force data refresh'
- 'Timeline-SMP: set data by entry name' -> { window?: string[], chart?: string[], xEntry?: string, yEntry?: string, zEntry?: string }, Equivalent to 'Settings/Set *-Axis Data'. Match by name. Changes to multiple axis are done by setting their respective names in a single call. Note this change is always saved between panel reloads.
- 'Timeline-SMP: set data aggregation' -> { window?: string[], chart?: string[], groupBy: {y?: string, yKey?: string }, bSaveProperties?: boolean }, Equivalent to 'Settings/Aggregate by'.
- 'Timeline-SMP: set data time range' -> { window?: string[], chart?: string[], timeRange: { timePeriod?: number, timeKey?: string }, bSaveProperties?: boolean }, Equivalent to 'Settings/Time range'. Check getTimeRange() at timeline.js file (main.js within package).
- 'Timeline-SMP: set data filter by name' -> { window?: string[], chart?: string[], filterEntry: string, bSaveProperties?: boolean }, Equivalent to 'Settings/Data filtering'. Match by name.
- 'Timeline-SMP: set data source' -> { window?: string[], chart?: string[], dataSource: { sourceType?: string, sourceArg?: string[]|FbMetadbHandleList, bRemoveDuplicates?: boolean }, bSaveProperties?: boolean }, Sets data source. sourceType can be any of 'library'|'activePlaylist'|'playingPlaylist'|'playlist'|'handleList'. When using 'playlist' as source, sourceArg must be an array of playlist names; for 'handleList', provide a FbMetadbHandleList.
- 'Timeline-SMP: set data' -> { window?: string[], chart?: string[], entry: object, bSaveProperties?: boolean }, Completely sets chart data with custom variables, check chart.setData() at timeline.js file (main.js within package).
- 'Timeline-SMP: set chart type' -> { window?: string[], chart?: string[], type: string, bSaveProperties?: boolean }, Equivalent to 'Display Settings/Chart type'. Check _chartGraphType at main\statistics\statistics_xxx.js for valid types. Currently: 'timeline'|'bars'|'bars-horizontal'|'lines'|'lines-hq'|'fill'|'scatter'|'doughnut'|'pie'.
- 'Timeline-SMP: set chart sorting' -> { window?: string[], chart?: string[], sort: {x?: string, y?: string, z?: string, my?: string, mz?:string}, bSaveProperties?: boolean }, Equivalent to 'Display Settings/Sorting'. Check on_notify_data at timeline.js file (main.js within package) for valid strings. For ex. 'natural'.
- 'Timeline-SMP: set chart slice' -> { window?: string[], chart?: string[], slice: [number, number], bSaveProperties?: boolean }, Equivalent to 'Display Settings/Show (X-Axis)'. Set 2 numbers for x-axis limits.
- 'Timeline-SMP: set chart filter' -> { window?: string[], chart?: string[], filter?: Function|string, mFilter?: boolean, bSaveProperties?: boolean }, Equivalent to 'Display Settings/Filter (*-Axis)'. The Y-Axis filter (bound to 'filter' variable) can be a function or a stringified function, which will be evaluated at runtime. For ex. "function (p) {return p.y > 5;}".
- 'Timeline-SMP: set chart settings' -> { window?: string[], chart?: string[], settings: object, bSaveProperties?: boolean }, Completely sets chart UI with custom variables, check .changeConfig() at main\statistics\statistics_xxx.js.
- bSaveProperties controls whether the new setting is saved between panel reloads or not.
Changed
- Data: Z-axis is now disabled when using the Y-axis 'Listens (range)' option along special X-axis keys (day, week, month, ...), since no data can be currently calculated in such mode for 3D charts. Previously it simply displayed no data.
- Data: filter (Y-axis) settings are now saved and restored between sessions. This is done by serializing the actual filter function as a string within the properties panel, so it's technically possible to edit it and add more complex logic. Don't ask for support/info about it, since only the default 'Greater than', 'Lower than', ... options are supported.
- UI: 'Set *-axis data' submenus now show the custom TF expression used, if any, at 'By Tf...' entry.
- UI: better adjustments of X-Axis labels in case there is not enough width to fit them all.
Removed
Fixed
- JSplitter: fixed compatibility bug with JSplitter (any version) due to improper constructor used on JS Host as reported here and here.
- Data: fixed secondary settings not being applied when using built-in query filters based on selection.
- UI: fixed dynamic colors external integration in some cases due to a typo.
