xychart.proto 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. // Copyright 2021 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 go_package = "google.golang.org/genproto/googleapis/monitoring/dashboard/v1;dashboard";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "XyChartProto";
  22. option java_package = "com.google.monitoring.dashboard.v1";
  23. option php_namespace = "Google\\Cloud\\Monitoring\\Dashboard\\V1";
  24. option ruby_package = "Google::Cloud::Monitoring::Dashboard::V1";
  25. // A chart that displays data on a 2D (X and Y axes) plane.
  26. message XyChart {
  27. // Groups a time series query definition with charting options.
  28. message DataSet {
  29. // The types of plotting strategies for data sets.
  30. enum PlotType {
  31. // Plot type is unspecified. The view will default to `LINE`.
  32. PLOT_TYPE_UNSPECIFIED = 0;
  33. // The data is plotted as a set of lines (one line per series).
  34. LINE = 1;
  35. // The data is plotted as a set of filled areas (one area per series),
  36. // with the areas stacked vertically (the base of each area is the top of
  37. // its predecessor, and the base of the first area is the X axis). Since
  38. // the areas do not overlap, each is filled with a different opaque color.
  39. STACKED_AREA = 2;
  40. // The data is plotted as a set of rectangular boxes (one box per series),
  41. // with the boxes stacked vertically (the base of each box is the top of
  42. // its predecessor, and the base of the first box is the X axis). Since
  43. // the boxes do not overlap, each is filled with a different opaque color.
  44. STACKED_BAR = 3;
  45. // The data is plotted as a heatmap. The series being plotted must have a
  46. // `DISTRIBUTION` value type. The value of each bucket in the distribution
  47. // is displayed as a color. This type is not currently available in the
  48. // Stackdriver Monitoring application.
  49. HEATMAP = 4;
  50. }
  51. // Required. Fields for querying time series data from the
  52. // Stackdriver metrics API.
  53. TimeSeriesQuery time_series_query = 1 [(google.api.field_behavior) = REQUIRED];
  54. // How this data should be plotted on the chart.
  55. PlotType plot_type = 2;
  56. // A template string for naming `TimeSeries` in the resulting data set.
  57. // This should be a string with interpolations of the form `${label_name}`,
  58. // which will resolve to the label's value.
  59. string legend_template = 3;
  60. // Optional. The lower bound on data point frequency for this data set, implemented by
  61. // specifying the minimum alignment period to use in a time series query
  62. // For example, if the data is published once every 10 minutes, the
  63. // `min_alignment_period` should be at least 10 minutes. It would not
  64. // make sense to fetch and align data at one minute intervals.
  65. google.protobuf.Duration min_alignment_period = 4 [(google.api.field_behavior) = OPTIONAL];
  66. }
  67. // A chart axis.
  68. message Axis {
  69. // Types of scales used in axes.
  70. enum Scale {
  71. // Scale is unspecified. The view will default to `LINEAR`.
  72. SCALE_UNSPECIFIED = 0;
  73. // Linear scale.
  74. LINEAR = 1;
  75. // Logarithmic scale (base 10).
  76. LOG10 = 2;
  77. }
  78. // The label of the axis.
  79. string label = 1;
  80. // The axis scale. By default, a linear scale is used.
  81. Scale scale = 2;
  82. }
  83. // Required. The data displayed in this chart.
  84. repeated DataSet data_sets = 1 [(google.api.field_behavior) = REQUIRED];
  85. // The duration used to display a comparison chart. A comparison chart
  86. // simultaneously shows values from two similar-length time periods
  87. // (e.g., week-over-week metrics).
  88. // The duration must be positive, and it can only be applied to charts with
  89. // data sets of LINE plot type.
  90. google.protobuf.Duration timeshift_duration = 4;
  91. // Threshold lines drawn horizontally across the chart.
  92. repeated Threshold thresholds = 5;
  93. // The properties applied to the X axis.
  94. Axis x_axis = 6;
  95. // The properties applied to the Y axis.
  96. Axis y_axis = 7;
  97. // Display options for the chart.
  98. ChartOptions chart_options = 8;
  99. }
  100. // Options to control visual rendering of a chart.
  101. message ChartOptions {
  102. // Chart mode options.
  103. enum Mode {
  104. // Mode is unspecified. The view will default to `COLOR`.
  105. MODE_UNSPECIFIED = 0;
  106. // The chart distinguishes data series using different color. Line
  107. // colors may get reused when there are many lines in the chart.
  108. COLOR = 1;
  109. // The chart uses the Stackdriver x-ray mode, in which each
  110. // data set is plotted using the same semi-transparent color.
  111. X_RAY = 2;
  112. // The chart displays statistics such as average, median, 95th percentile,
  113. // and more.
  114. STATS = 3;
  115. }
  116. // The chart mode.
  117. Mode mode = 1;
  118. }