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

@ersinfotech/analysis-charts_utils

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ersinfotech/analysis-charts_utils - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

dist/index.js

@@ -389,3 +389,6 @@ 'use strict';

const data = _.get(matrix, `["${columnName}"]["${subColumnName}"]["${rowName}"]["${rowKey}"]`);
const val = _.get(data, `["${valueKey}"]`, '-');
let val = _.get(data, `["${valueKey}"]`, '0');
if (colSpan == 2 && val == '0') {
val = ['0', '0'];
}
rowData.push(val);

@@ -392,0 +395,0 @@ });

2

package.json
{
"name": "@ersinfotech/analysis-charts_utils",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

@@ -5,0 +5,0 @@ "license": "ISC",

@@ -60,3 +60,6 @@ import _ from 'lodash';

);
const val = _.get(data, `["${valueKey}"]`, '-');
let val = _.get(data, `["${valueKey}"]`, '0');
if (colSpan == 2 && val == '0') {
val = ['0', '0'];
}
rowData.push(val);

@@ -63,0 +66,0 @@ });

const { getRenderChartData } = require('./dist/index');
console.log('xxx');
const dataJson = {
groups: [
{
id: 'q0c7e305968cb48b48a4d4a6ca4744373',
type: 'checkbox',
title: '2. 愛好',
description: '',
required: true,
refer: null,
blank_setting: [],
qindex: 2,
page: 0,
qid: 'q0c7e305968cb48b48a4d4a6ca4744373',
disabled: false,
_id: 'keyword001',
key: 'groups_q0c7e305968cb48b48a4d4a6ca4744373',
name: '愛好',
},
{
id: 'q6deda784300143079765e0275031cbc6',
type: 'radio',
title: 'q1. 性別',
description: '',
required: true,
refer: null,
serialNumber: 'q1',
qindex: 'q1',
page: 0,
qid: 'q6deda784300143079765e0275031cbc6',
disabled: false,
_id: 'keyword000',
key: 'groups_q6deda784300143079765e0275031cbc6',
name: '性別',
},
],
values: [
{ key: 'count', name: '數量', title: '數量', _id: '_id', id: 'count' },
],
chartProps: {
title: { text: '交叉百分比', subText: '備註' },
decimalPlaces: 1,
type: '2dTable',
percentMode: { enabled: false },
percent: { enabled: true, denominator: 'CUSTOM' },
total: { enabled: true },
},
dataTotal: { 女: 2, 男: 2 },
data: [
{
count: 2,
groups_q0c7e305968cb48b48a4d4a6ca4744373: '唱',
groups_q6deda784300143079765e0275031cbc6: '男',
},
{
count: 1,
groups_q0c7e305968cb48b48a4d4a6ca4744373: '跳',
groups_q6deda784300143079765e0275031cbc6: '男',
},
{
count: 2,
groups_q0c7e305968cb48b48a4d4a6ca4744373: '唱',
groups_q6deda784300143079765e0275031cbc6: '女',
},
{
count: 1,
groups_q0c7e305968cb48b48a4d4a6ca4744373: '跳',
groups_q6deda784300143079765e0275031cbc6: '女',
},
{
count: 1,
groups_q0c7e305968cb48b48a4d4a6ca4744373: 'rap',
groups_q6deda784300143079765e0275031cbc6: '女',
},
],
};
const chartData = getRenderChartData({
data: dataJson.data,
groups: dataJson.groups,
values: dataJson.values,
chartProps: dataJson.chartProps,
dataTotal: dataJson.dataTotal,
locale: 'en-US',
});
console.log('xxx', chartData);
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