123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263 |
- import Chart from "../../../src/chart/bar/ChartBar17/ChartBar17";
- import option from "../../../src/option/globalDefaultOption";
-
-
- const consoleWarn = window.console.warn;
- window.console.warn = function() {
- const string = arguments[0];
- const filterStrings = [
- 'is not power of two',
- 'image is too big',
- 'marked for update',
- 'can\'t invert matrix'
- ];
-
- const shouldBeFiltered = filterStrings.some(string => (
- arguments[0].includes('THREE') && arguments[0].includes(string)
- ));
- if (shouldBeFiltered) {
-
-
-
-
- } else {
-
- consoleWarn.apply(null, arguments);
- }
- };
- let bar=new Chart(document.querySelector(".c1"),{});
- window.addEventListener("resize",function () {
- bar.resize()
- })
- let changeOpt = {
- color: ['#0a73dc', '#04a2ae', '#424a95', '#2a7ebe', '#113b85', '#a2f9ff', '#01a0c8', '#5879c0', '#74e9f2', '#126087', '#99b5da'],
- bg: {
- backgroundColor: "#000000"
- },
- legend: {
- show: true,
- left: "70%",
- top: '5%',
- orient: 'horizontal',
- itemWidth: 8,
- itemHeight: 8,
- borderRadius: 0,
- textStyle: {
- fontSize: 14,
- color: "#ffffff"
- }
- },
- tooltip: {
- show: true,
- paddingW:10,
- paddingH: 10,
- itemGap: 2,
-
- offsetX: 15,
- offsetY: 0,
- titleFontSize:14,
- titleColor: '#ff0000',
- itemFontSize:12,
- itemColor:"#ffffff",
- borderColor: '#ccc',
- borderWidth: 0,
- backgroundColor: 'rgba(255,255,255,0)',
-
- },
- grid: {
- left: "0%",
- right: "20",
- top: "20%",
- bottom: "40%"
- },
- valueAxis: {
- textStyle: {
- fontSize: 12,
- color: "#ffffff",
- shadowBlur: 5,
- shadowColor: "#ff0000"
- }
- },
- categoryAxis: {
- textStyle: {
- fontSize: 14,
- color: "#ffffff",
- shadowBlur: 0,
- shadowColor: "#ffffff"
- },
-
- data: ["小米", "华为", "苹果", "三星", "vivo", "oppo"]
- },
- series: [
-
-
-
-
- {
- name: "二季度销量",
- data: [581244, 0, 512544, 223133, 158514, 122348]
- }
- ]
- }
- const option2 = {
- color: ['#0a73dc', '#04a2ae', '#424a95', '#2a7ebe', '#113b85', '#a2f9ff', '#01a0c8', '#5879c0', '#74e9f2', '#126087', '#99b5da'],
- bg: {
- backgroundColor: "#000000"
- },
- legend: {
- show: true,
- left: "60%",
- top: '15%',
- orient: 'horizontal',
- itemWidth: 8,
- itemHeight: 8,
- borderRadius: 0,
- textStyle: {
- fontSize: 24,
- color: "#ffffff",
- fontWeight:'bold'
- }
- },
- tooltip: {
- show: true,
- paddingW:10,
- paddingH: 10,
- itemGap: 2,
-
- offsetX: 15,
- offsetY: 0,
- titleFontSize:14,
- titleColor: '#ff0000',
- itemFontSize:12,
- itemColor:"#ffffff",
- borderColor: '#ccc',
- borderWidth: 0,
- backgroundColor: 'rgba(255,255,255,0)',
-
- },
-
-
-
-
-
-
- grid:{
- left:"20%",
- right:"20%",
- top:"20%",
- bottom:"15%"
- },
- valueAxis: {
- textStyle: {
- fontSize: 12,
- color: "#ffffff",
- shadowBlur: 5,
- shadowColor: "#ff0000"
- }
- },
- categoryAxis: {
- textStyle: {
- fontSize: 14,
- color: "#ffffff",
- shadowBlur: 0,
- shadowColor: "#ffffff"
- },
-
-
- data: ["小米", "华为", "苹果", "三星"]
- },
- series: [
- {
- name: "一季度销量",
-
-
- data: [581244, 563334, 512544, 496554]
- },
-
-
-
-
- ]
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|