New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

d2-charts-api

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d2-charts-api - npm Package Compare versions

Comparing version 32.0.1 to 32.0.2

27

lib/config/adapters/dhis_highcharts/series/index.js

@@ -68,30 +68,7 @@ 'use strict';

// returns:
// {
// id1: 'color1',
// id2: 'color2',
// id3: 'color3',
// };
function getIdColorMap(seriesItems, series, layout, extraOptions) {
if ((0, _seriesItems.hasExtraAxis)(seriesItems) && (0, _type.isDualAxis)(layout.type)) {
// {
// 0: ['id1', 'id2', 'id3'],
// 1: ['id4', 'id5'],
// };
if ((0, _seriesItems.hasExtraAxisItems)(seriesItems, layout.columns) && (0, _type.isDualAxis)(layout.type)) {
var axisIdsMap = (0, _seriesItems.getAxisIdsMap)(seriesItems, series);
// {
// 0: {
// startColor: '#3f6a92',
// endColor: '#6cb8ff'
// },
// 1: {
// startColor: '#9e3640',
// endColor: '#ff5666',
// },
// };
var theme = extraOptions.multiAxisTheme;
// {
// 0: ['color1', 'color2', 'color3'],
// 1: ['color4', 'color5'],
// };
var colorsByAxis = Object.keys(axisIdsMap).reduce(function (map, axis) {

@@ -98,0 +75,0 @@ var numberOfIds = axisIdsMap[axis].length;

2

lib/config/adapters/dhis_highcharts/yAxis/index.js

@@ -116,3 +116,3 @@ 'use strict';

if ((0, _type.isDualAxis)(layout.type) && (0, _seriesItems.hasExtraAxis)(layout.seriesItems) && (0, _seriesItems.hasExtraAxisItems)(layout.seriesItems, layout.columns)) {
if ((0, _type.isDualAxis)(layout.type) && (0, _seriesItems.hasExtraAxisItems)(layout.seriesItems, layout.columns)) {
axes.push({

@@ -119,0 +119,0 @@ title: {

{
"name": "d2-charts-api",
"version": "32.0.1",
"version": "32.0.2",
"description": "DHIS2 charts api",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ import getCumulativeData from './../getCumulativeData';

import { CHART_TYPE_PIE, CHART_TYPE_GAUGE } from '../type';
import { getFullIdAxisMap, getAxisIdsMap, hasExtraAxis } from '../seriesItems';
import { getFullIdAxisMap, getAxisIdsMap, hasExtraAxisItems } from '../seriesItems';
import { generateColors } from '../../../../util/colors/gradientColorGenerator';

@@ -27,30 +27,7 @@

// returns:
// {
// id1: 'color1',
// id2: 'color2',
// id3: 'color3',
// };
function getIdColorMap(seriesItems, series, layout, extraOptions) {
if (hasExtraAxis(seriesItems) && isDualAxis(layout.type)) {
// {
// 0: ['id1', 'id2', 'id3'],
// 1: ['id4', 'id5'],
// };
if (hasExtraAxisItems(seriesItems, layout.columns) && isDualAxis(layout.type)) {
const axisIdsMap = getAxisIdsMap(seriesItems, series);
// {
// 0: {
// startColor: '#3f6a92',
// endColor: '#6cb8ff'
// },
// 1: {
// startColor: '#9e3640',
// endColor: '#ff5666',
// },
// };
const theme = extraOptions.multiAxisTheme;
// {
// 0: ['color1', 'color2', 'color3'],
// 1: ['color4', 'color5'],
// };
const colorsByAxis = Object.keys(axisIdsMap).reduce((map, axis) => {

@@ -57,0 +34,0 @@ const numberOfIds = axisIdsMap[axis].length;

@@ -9,3 +9,3 @@ import arrayClean from 'd2-utilizr/lib/arrayClean';

import { getIsStacked } from '../type';
import { hasExtraAxis, hasExtraAxisItems } from '../seriesItems';
import { hasExtraAxisItems } from '../seriesItems';

@@ -92,3 +92,2 @@ const DEFAULT_MIN_VALUE = 0;

if (isDualAxis(layout.type) &&
hasExtraAxis(layout.seriesItems) &&
hasExtraAxisItems(layout.seriesItems, layout.columns)) {

@@ -95,0 +94,0 @@ axes.push({

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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