Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cubejs-client/core

Package Overview
Dependencies
Maintainers
2
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubejs-client/core - npm Package Compare versions

Comparing version 0.13.0 to 0.13.5

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.13.5](https://github.com/cube-js/cube.js/compare/v0.13.4...v0.13.5) (2019-12-17)
### Features
* Return key in the resultSet.series alongside title ([#291](https://github.com/cube-js/cube.js/issues/291)) ([6144a86](https://github.com/cube-js/cube.js/commit/6144a86))
# [0.13.0](https://github.com/cube-js/cube.js/compare/v0.12.3...v0.13.0) (2019-12-10)

@@ -8,0 +19,0 @@

@@ -86,3 +86,35 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread';

}
/**
* Returns an array of series with key, title and series data.
*
* ```js
* // For query
* {
* measures: ['Stories.count'],
* timeDimensions: [{
* dimension: 'Stories.time',
* dateRange: ['2015-01-01', '2015-12-31'],
* granularity: 'month'
* }]
* }
*
* // ResultSet.series() will return
* [
* {
* "key":"Stories.count",
* "title": "Stories Count",
* "series": [
* { "x":"2015-01-01T00:00:00", "value": 27120 },
* { "x":"2015-02-01T00:00:00", "value": 25861 },
* { "x": "2015-03-01T00:00:00", "value": 29661 },
* //...
* ]
* }
* ]
* ```
* @param pivotConfig
* @returns {Array}
*/
_createClass(ResultSet, [{

@@ -98,2 +130,3 @@ key: "series",

title: title,
key: key,
series: _this.chartPivot(pivotConfig).map(function (_ref2) {

@@ -100,0 +133,0 @@ var category = _ref2.category,

@@ -92,3 +92,35 @@ 'use strict';

}
/**
* Returns an array of series with key, title and series data.
*
* ```js
* // For query
* {
* measures: ['Stories.count'],
* timeDimensions: [{
* dimension: 'Stories.time',
* dateRange: ['2015-01-01', '2015-12-31'],
* granularity: 'month'
* }]
* }
*
* // ResultSet.series() will return
* [
* {
* "key":"Stories.count",
* "title": "Stories Count",
* "series": [
* { "x":"2015-01-01T00:00:00", "value": 27120 },
* { "x":"2015-02-01T00:00:00", "value": 25861 },
* { "x": "2015-03-01T00:00:00", "value": 29661 },
* //...
* ]
* }
* ]
* ```
* @param pivotConfig
* @returns {Array}
*/
_createClass(ResultSet, [{

@@ -104,2 +136,3 @@ key: "series",

title: title,
key: key,
series: _this.chartPivot(pivotConfig).map(function (_ref2) {

@@ -106,0 +139,0 @@ var category = _ref2.category,

4

package.json
{
"name": "@cubejs-client/core",
"version": "0.13.0",
"version": "0.13.5",
"repository": {

@@ -35,3 +35,3 @@ "type": "git",

},
"gitHead": "61e21aec1489a441a0b8aeceb9ee8cb7fbd6efb1"
"gitHead": "18c2fea5ecf94045480fc979c5483ef034e4b386"
}

@@ -38,5 +38,37 @@ /**

/**
* Returns an array of series with key, title and series data.
*
* ```js
* // For query
* {
* measures: ['Stories.count'],
* timeDimensions: [{
* dimension: 'Stories.time',
* dateRange: ['2015-01-01', '2015-12-31'],
* granularity: 'month'
* }]
* }
*
* // ResultSet.series() will return
* [
* {
* "key":"Stories.count",
* "title": "Stories Count",
* "series": [
* { "x":"2015-01-01T00:00:00", "value": 27120 },
* { "x":"2015-02-01T00:00:00", "value": 25861 },
* { "x": "2015-03-01T00:00:00", "value": 29661 },
* //...
* ]
* }
* ]
* ```
* @param pivotConfig
* @returns {Array}
*/
series(pivotConfig) {
return this.seriesNames(pivotConfig).map(({ title, key }) => ({
title,
key,
series: this.chartPivot(pivotConfig).map(({ category, x, ...obj }) => ({ value: obj[key], category, x }))

@@ -43,0 +75,0 @@ }));

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc