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

react-icecream-charts

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-icecream-charts - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

lib/_chart/options/plot/series-options.d.ts

15

esm/_base/modules/colors/ts/grey.d.ts
declare enum Grey {
grey1 = "#FFFFFF",
grey2 = "#FAFAFA",
grey3 = "#F5F5F5",
grey4 = "#EEEEEE",
grey5 = "#E5E5E5",
grey6 = "#D9D9D9",
grey7 = "#BFBFBF",
grey8 = "#999999",
grey9 = "#666666",
grey10 = "#333333"
grey2 = "#F5F5F5",
grey3 = "#EEEEEE",
grey4 = "#BFBFBF",
grey5 = "#999999",
grey6 = "#666666",
grey7 = "#333333"
}
export default Grey;

@@ -11,12 +11,9 @@ /*

Grey["grey1"] = "#FFFFFF";
Grey["grey2"] = "#FAFAFA";
Grey["grey3"] = "#F5F5F5";
Grey["grey4"] = "#EEEEEE";
Grey["grey5"] = "#E5E5E5";
Grey["grey6"] = "#D9D9D9";
Grey["grey7"] = "#BFBFBF";
Grey["grey8"] = "#999999";
Grey["grey9"] = "#666666";
Grey["grey10"] = "#333333"; // 主标题、正文
Grey["grey2"] = "#F5F5F5";
Grey["grey3"] = "#EEEEEE";
Grey["grey4"] = "#BFBFBF";
Grey["grey5"] = "#999999";
Grey["grey6"] = "#666666";
Grey["grey7"] = "#333333"; // 主标题、正文
})(Grey || (Grey = {}));
export default Grey;

@@ -16,1 +16,9 @@ export declare type AxisFormatterObject = {

};
/**
* The type of axis. Can be one of linear, logarithmic, datetime.
* In a datetime axis, the numbers are given in milliseconds,
* and tick marks are placed on appropriate values like full hours or days.
*
* Defaults to linear.
*/
export declare type AxisTypeValue = 'linear' | 'logarithmic' | 'datetime';

7

esm/_chart/options/chart/x-axis.d.ts

@@ -1,3 +0,2 @@

import { AxisLabelsOptions } from './common';
export declare type AxisTypeValue = 'linear' | 'datetime';
import { AxisLabelsOptions, AxisTypeValue } from './common';
export declare type XAxisOptionsDateTimeLabelFormats = {

@@ -24,7 +23,5 @@ millisecond: string;

/**
* The type of axis. Can be one of linear, logarithmic, datetime or category.
* The type of axis. Can be one of linear, logarithmic, datetime.
* In a datetime axis, the numbers are given in milliseconds,
* and tick marks are placed on appropriate values like full hours or days.
* In a category axis, the point names of the chart's series are used for categories,
* if not a categories array is defined.
*

@@ -31,0 +28,0 @@ * Defaults to linear.

import { ChartOptions } from '.';
import { AxisLabelsOptions } from './common';
import { AxisTypeValue, AxisLabelsOptions } from './common';
export declare type YAxisPlotLine = Pick<Highcharts.YAxisPlotLinesOptions, 'value'> & Pick<Highcharts.YAxisPlotLinesLabelOptions, 'text'>;

@@ -11,2 +11,10 @@ export declare type YAxisLabelsOptions = AxisLabelsOptions & {};

/**
* The type of axis. Can be one of linear, logarithmic, datetime.
* In a datetime axis, the numbers are given in milliseconds,
* and tick marks are placed on appropriate values like full hours or days.
*
* Defaults to linear.
*/
type?: AxisTypeValue;
/**
* The minimum value of the axis. If null the min value is automatically calculated.

@@ -13,0 +21,0 @@ */

@@ -26,8 +26,5 @@ var __assign = (this && this.__assign) || function () {

import { Cobalt, Blue, Green, Olivine, Yellow, OrangeRed, Magenta, Purple } from 'icecream-base/lib/colors';
import { createHighOptions, createRightCenterLegendOptions, createHighSeriesOptions, isPointOptionsObject, createHighPointOptions } from '../_chart';
import { createHighOptions, createHighLegendOptions, createHighSeriesOptions, isPointOptionsObject, createHighPointOptions } from '../_chart';
export function createPieOptions(langData, options, chartOptions, series) {
var legendColumns = (chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.legend) && chartOptions.legend.columns;
if (legendColumns === false) {
legendColumns = undefined;
}
var legendColumns = (chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.legend) ? chartOptions.legend.columns : undefined;
var pieOptions = {

@@ -52,3 +49,3 @@ colors: [

],
legend: createRightCenterLegendOptions(),
legend: createPieLegendOptions(chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.legend),
plotOptions: {

@@ -75,8 +72,14 @@ pie: {

};
if (legendColumns != null) {
pieOptions.legend.layout = 'horizontal';
return createHighOptions('pie', omit(chartOptions, 'legend'), langData, options, pieOptions);
}
function createPieLegendOptions(options) {
if (options === void 0) { options = {}; }
if (options === false) {
return { enabled: false };
}
if ((chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.legend) && chartOptions.legend.labelFormatter) {
var innerLabelFormatter_1 = chartOptions.legend.labelFormatter;
pieOptions.legend.labelFormatter = function labelFormatter() {
var _a = options.align, align = _a === void 0 ? 'right-center' : _a, columns = options.columns, pieLabelFormatter = options.labelFormatter, restOptions = __rest(options, ["align", "columns", "labelFormatter"]);
var _b = createHighLegendOptions(__assign({ align: align }, restOptions)), layout = _b.layout, labelFormatter = _b.labelFormatter, rest = __rest(_b, ["layout", "labelFormatter"]);
var pieLegendOptions = __assign(__assign({}, rest), { layout: columns ? 'horizontal' : layout });
if (pieLabelFormatter) {
pieLegendOptions.labelFormatter = function _labelFormatter() {
if (this instanceof Highcharts.Point) {

@@ -91,3 +94,3 @@ var pointData = {

};
return innerLabelFormatter_1(pointData);
return pieLabelFormatter(pointData);
}

@@ -97,3 +100,3 @@ return this.name;

}
return createHighOptions('pie', omit(chartOptions, 'legend', 'labelFormatter'), langData, options, pieOptions);
return pieLegendOptions;
}

@@ -100,0 +103,0 @@ function createSeriesPieOptions(series) {

declare enum Grey {
grey1 = "#FFFFFF",
grey2 = "#FAFAFA",
grey3 = "#F5F5F5",
grey4 = "#EEEEEE",
grey5 = "#E5E5E5",
grey6 = "#D9D9D9",
grey7 = "#BFBFBF",
grey8 = "#999999",
grey9 = "#666666",
grey10 = "#333333"
grey2 = "#F5F5F5",
grey3 = "#EEEEEE",
grey4 = "#BFBFBF",
grey5 = "#999999",
grey6 = "#666666",
grey7 = "#333333"
}
export default Grey;

@@ -13,12 +13,9 @@ "use strict";

Grey["grey1"] = "#FFFFFF";
Grey["grey2"] = "#FAFAFA";
Grey["grey3"] = "#F5F5F5";
Grey["grey4"] = "#EEEEEE";
Grey["grey5"] = "#E5E5E5";
Grey["grey6"] = "#D9D9D9";
Grey["grey7"] = "#BFBFBF";
Grey["grey8"] = "#999999";
Grey["grey9"] = "#666666";
Grey["grey10"] = "#333333"; // 主标题、正文
Grey["grey2"] = "#F5F5F5";
Grey["grey3"] = "#EEEEEE";
Grey["grey4"] = "#BFBFBF";
Grey["grey5"] = "#999999";
Grey["grey6"] = "#666666";
Grey["grey7"] = "#333333"; // 主标题、正文
})(Grey || (Grey = {}));
exports.default = Grey;

@@ -16,1 +16,9 @@ export declare type AxisFormatterObject = {

};
/**
* The type of axis. Can be one of linear, logarithmic, datetime.
* In a datetime axis, the numbers are given in milliseconds,
* and tick marks are placed on appropriate values like full hours or days.
*
* Defaults to linear.
*/
export declare type AxisTypeValue = 'linear' | 'logarithmic' | 'datetime';

@@ -1,3 +0,2 @@

import { AxisLabelsOptions } from './common';
export declare type AxisTypeValue = 'linear' | 'datetime';
import { AxisLabelsOptions, AxisTypeValue } from './common';
export declare type XAxisOptionsDateTimeLabelFormats = {

@@ -24,7 +23,5 @@ millisecond: string;

/**
* The type of axis. Can be one of linear, logarithmic, datetime or category.
* The type of axis. Can be one of linear, logarithmic, datetime.
* In a datetime axis, the numbers are given in milliseconds,
* and tick marks are placed on appropriate values like full hours or days.
* In a category axis, the point names of the chart's series are used for categories,
* if not a categories array is defined.
*

@@ -31,0 +28,0 @@ * Defaults to linear.

import { ChartOptions } from '.';
import { AxisLabelsOptions } from './common';
import { AxisTypeValue, AxisLabelsOptions } from './common';
export declare type YAxisPlotLine = Pick<Highcharts.YAxisPlotLinesOptions, 'value'> & Pick<Highcharts.YAxisPlotLinesLabelOptions, 'text'>;

@@ -11,2 +11,10 @@ export declare type YAxisLabelsOptions = AxisLabelsOptions & {};

/**
* The type of axis. Can be one of linear, logarithmic, datetime.
* In a datetime axis, the numbers are given in milliseconds,
* and tick marks are placed on appropriate values like full hours or days.
*
* Defaults to linear.
*/
type?: AxisTypeValue;
/**
* The minimum value of the axis. If null the min value is automatically calculated.

@@ -13,0 +21,0 @@ */

@@ -34,6 +34,3 @@ "use strict";

function createPieOptions(langData, options, chartOptions, series) {
var legendColumns = (chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.legend) && chartOptions.legend.columns;
if (legendColumns === false) {
legendColumns = undefined;
}
var legendColumns = (chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.legend) ? chartOptions.legend.columns : undefined;
var pieOptions = {

@@ -58,3 +55,3 @@ colors: [

],
legend: _chart_1.createRightCenterLegendOptions(),
legend: createPieLegendOptions(chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.legend),
plotOptions: {

@@ -81,8 +78,15 @@ pie: {

};
if (legendColumns != null) {
pieOptions.legend.layout = 'horizontal';
return _chart_1.createHighOptions('pie', omit_1.default(chartOptions, 'legend'), langData, options, pieOptions);
}
exports.createPieOptions = createPieOptions;
function createPieLegendOptions(options) {
if (options === void 0) { options = {}; }
if (options === false) {
return { enabled: false };
}
if ((chartOptions === null || chartOptions === void 0 ? void 0 : chartOptions.legend) && chartOptions.legend.labelFormatter) {
var innerLabelFormatter_1 = chartOptions.legend.labelFormatter;
pieOptions.legend.labelFormatter = function labelFormatter() {
var _a = options.align, align = _a === void 0 ? 'right-center' : _a, columns = options.columns, pieLabelFormatter = options.labelFormatter, restOptions = __rest(options, ["align", "columns", "labelFormatter"]);
var _b = _chart_1.createHighLegendOptions(__assign({ align: align }, restOptions)), layout = _b.layout, labelFormatter = _b.labelFormatter, rest = __rest(_b, ["layout", "labelFormatter"]);
var pieLegendOptions = __assign(__assign({}, rest), { layout: columns ? 'horizontal' : layout });
if (pieLabelFormatter) {
pieLegendOptions.labelFormatter = function _labelFormatter() {
if (this instanceof highcharts_1.default.Point) {

@@ -97,3 +101,3 @@ var pointData = {

};
return innerLabelFormatter_1(pointData);
return pieLabelFormatter(pointData);
}

@@ -103,5 +107,4 @@ return this.name;

}
return _chart_1.createHighOptions('pie', omit_1.default(chartOptions, 'legend', 'labelFormatter'), langData, options, pieOptions);
return pieLegendOptions;
}
exports.createPieOptions = createPieOptions;
function createSeriesPieOptions(series) {

@@ -108,0 +111,0 @@ var _a;

{
"name": "react-icecream-charts",
"version": "0.8.0",
"version": "0.9.0",
"license": "MIT",

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

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