/**!
 * Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2026)
 *
 * Licensed 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.
 */

syntax = "proto3";

option java_package = "com.snowflake.apps.streamlit";
option java_outer_classname = "MetricProto";

import "streamlit/proto/LabelVisibilityMessage.proto";

message Metric {
  string label = 1;
  string body = 2;
  string delta = 3;

  enum MetricDirection {
    DOWN = 0;
    UP = 1;
    NONE = 2;
  }
  MetricDirection direction = 4;

  enum MetricColor {
    RED = 0;
    GREEN = 1;
    GRAY = 2;
    ORANGE = 3;
    YELLOW = 4;
    BLUE = 5;
    VIOLET = 6;
    PRIMARY = 7;
  }
  MetricColor color = 5;
  string help = 6;
  LabelVisibilityMessage label_visibility = 7;
  bool show_border = 8;
  repeated double chart_data = 9;

  enum ChartType {
    LINE = 0;
    BAR = 1;
    AREA = 2;
  }
  ChartType chart_type = 10;

  // Format string for the value and delta (applied only if they are numeric).
  string format = 11;
}
