xychart.proto 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.monitoring.dashboard.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/monitoring/dashboard/v1/metrics.proto";
  18. import "google/protobuf/duration.proto";
  19. option csharp_namespace = "Google.Cloud.Monitoring.Dashboard.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "XyChartProto";
  23. option java_package = "com.google.monitoring.dashboard.v1";
  24. option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
  25. option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
  26. // A chart that displays data on a 2D (X and Y axes) plane.
  27. message XyChart {
  28. // Groups a time series query definition with charting options.
  29. message DataSet {
  30. // The types of plotting strategies for data sets.
  31. enum PlotType {
  32. // Plot type is unspecified. The view will default to `LINE`.
  33. PLOT_TYPE_UNSPECIFIED = 0;
  34. // The data is plotted as a set of lines (one line per series).
  35. LINE = 1;
  36. // The data is plotted as a set of filled areas (one area per series),
  37. // with the areas stacked vertically (the base of each area is the top of
  38. // its predecessor, and the base of the first area is the X axis). Since
  39. // the areas do not overlap, each is filled with a different opaque color.
  40. STACKED_AREA = 2;
  41. // The data is plotted as a set of rectangular boxes (one box per series),
  42. // with the boxes stacked vertically (the base of each box is the top of
  43. // its predecessor, and the base of the first box is the X axis). Since
  44. // the boxes do not overlap, each is filled with a different opaque color.
  45. STACKED_BAR = 3;
  46. // The data is plotted as a heatmap. The series being plotted must have a
  47. // `DISTRIBUTION` value type. The value of each bucket in the distribution
  48. // is displayed as a color. This type is not currently available in the
  49. // Stackdriver Monitoring application.
  50. HEATMAP = 4;
  51. }
  52. // An axis identifier.
  53. enum TargetAxis {
  54. // The target axis was not specified. Defaults to Y1.
  55. TARGET_AXIS_UNSPECIFIED = 0;
  56. // The y_axis (the right axis of chart).
  57. Y1 = 1;
  58. // The y2_axis (the left axis of chart).
  59. Y2 = 2;
  60. }
  61. // Required. Fields for querying time series data from the
  62. // Stackdriver metrics API.
  63. TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED];
  64. // How this data should be plotted on the chart.
  65. PlotType plot_type = 2;
  66. // A template string for naming `TimeSeries` in the resulting data set.
  67. // This should be a string with interpolations of the form `${label_name}`,
  68. // which will resolve to the label's value.
  69. string legend_template = 3;
  70. // Optional. The lower bound on data point frequency for this data set, implemented by
  71. // specifying the minimum alignment period to use in a time series query
  72. // For example, if the data is published once every 10 minutes, the
  73. // `min_alignment_period` should be at least 10 minutes. It would not
  74. // make sense to fetch and align data at one minute intervals.
  75. google.protobuf.Duration min_alignment_period = 4 [(google.api.field_behavior) = OPTIONAL];
  76. // Optional. The target axis to use for plotting the metric.
  77. TargetAxis target_axis = 5 [(google.api.field_behavior) = OPTIONAL];
  78. }
  79. // A chart axis.
  80. message Axis {
  81. // Types of scales used in axes.
  82. enum Scale {
  83. // Scale is unspecified. The view will default to `LINEAR`.
  84. SCALE_UNSPECIFIED = 0;
  85. // Linear scale.
  86. LINEAR = 1;
  87. // Logarithmic scale (base 10).
  88. LOG10 = 2;
  89. }
  90. // The label of the axis.
  91. string label = 1;
  92. // The axis scale. By default, a linear scale is used.
  93. Scale scale = 2;
  94. }
  95. // Required. The data displayed in this chart.
  96. repeated DataSet data_sets = 1 [(google.api.field_behavior) = REQUIRED];
  97. // The duration used to display a comparison chart. A comparison chart
  98. // simultaneously shows values from two similar-length time periods
  99. // (e.g., week-over-week metrics).
  100. // The duration must be positive, and it can only be applied to charts with
  101. // data sets of LINE plot type.
  102. google.protobuf.Duration timeshift_duration = 4;
  103. // Threshold lines drawn horizontally across the chart.
  104. repeated Threshold thresholds = 5;
  105. // The properties applied to the X axis.
  106. Axis x_axis = 6;
  107. // The properties applied to the Y axis.
  108. Axis y_axis = 7;
  109. // The properties applied to the Y2 axis.
  110. Axis y2_axis = 9;
  111. // Display options for the chart.
  112. ChartOptions chart_options = 8;
  113. }
  114. // Options to control visual rendering of a chart.
  115. message ChartOptions {
  116. // Chart mode options.
  117. enum Mode {
  118. // Mode is unspecified. The view will default to `COLOR`.
  119. MODE_UNSPECIFIED = 0;
  120. // The chart distinguishes data series using different color. Line
  121. // colors may get reused when there are many lines in the chart.
  122. COLOR = 1;
  123. // The chart uses the Stackdriver x-ray mode, in which each
  124. // data set is plotted using the same semi-transparent color.
  125. X_RAY = 2;
  126. // The chart displays statistics such as average, median, 95th percentile,
  127. // and more.
  128. STATS = 3;
  129. }
  130. // The chart mode.
  131. Mode mode = 1;
  132. }