ivandika3 commented on code in PR #4755: URL: https://github.com/apache/ozone/pull/4755#discussion_r1224018655
########## hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/heatMap/heatMapConfiguration.tsx: ########## @@ -0,0 +1,149 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React, { Component } from 'react'; +import { AgChartsReact } from 'ag-charts-react'; + +export default class HeatMapConfiguration extends Component { + constructor(props: {} | Readonly<{}>) { + super(props); + const { data } = this.props; + + const colorRange1 = [ + '#ffff99', //yellow start 80% + '#ffff80', //75% + '#ffff66', //70% + '#ffff4d', //yellow 65% + '#ffd24d', //dark Mustered yellow start 65% + '#ffbf00', //dark Mustard yellow end 50% + '#b38600', //Dark Mustard yellow 35% + '#ffb366', //orange start 70% + '#ff9933', //orange 60% + '#ff8c1a', //55% + '#e67300', //45% + '#994d00', //orange end 30% + '#ff6633', //Red start 60% + '#ff4000', // Red 50% + '#cc3300', //40% + '#992600', //30% + '#802000', //25% + '#661a00', //20% + '#4d1300', // 15% + '#330000', //dark Maroon + '#330d00', //10 % Last Red + ]; + + this.state = { + // Tree Map Options Start + options: { + data, + series: [ + { + type: 'treemap', + labelKey: 'label',// the name of the key to fetch the label value from + sizeKey: 'normalizedSize',// the name of the key to fetch the value that will determine tile size + colorkey: 'color', + fontSize: 35, + title: { color: 'white', fontSize: 18, fontFamily:'Courier New' }, + subtitle: { color: 'white', fontSize: 15, fontFamily:'Courier New' }, + tooltip: { + renderer: (params) => { + return { + content: this.tooltipContent(params) + }; + } + }, + formatter: ({ highlighted}) => { + const stroke = highlighted ? 'yellow' : 'white'; + return { stroke }; + }, Review Comment: <img width="262" alt="image" src="https://github.com/apache/ozone/assets/36403683/6264611f-7e52-4bdc-8ef3-21d712fe403e"> The bottom of the title and subtitles are truncated since the borders are also white. It also doesn't demarcate well with the white background. Maybe we can modify some of the colorings and padding between border and the text? I think the example in the website https://www.ag-grid.com/react-charts/gallery/market-index-treemap/ looks fine. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
