You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "devabhishekpal (via GitHub)" <gi...@apache.org> on 2023/06/09 09:07:34 UTC

[GitHub] [ozone] devabhishekpal commented on a diff in pull request #4755: HDDS-8487. Recon Heatmap UI Changes and Size Normalization

devabhishekpal commented on code in PR #4755:
URL: https://github.com/apache/ozone/pull/4755#discussion_r1224047576


##########
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:
   Hello @ivandika3 , there is an alternative UI which I am working on, and will be pushed once this gets merged.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org