syntax = "proto3";

import "figure_type/line.proto";
import "figure_type/heatmap.proto";
import "figure_type/histogram.proto";

message Figure {
    string uuid = 1;
    string title = 2;
    string x_label = 3;
    string y_label = 4;

    bool logx = 5;
    bool logy = 6;
}

message FigureData {
    string uuid = 1;
    oneof figure {
        LineChartData line = 2;
        HeatmapData heatmap = 3;
        HistogramData histogram = 4;
    }
}

message FigureRequest {}
message FigureDataRequest { string uuid = 1; }

service FigureService {
    rpc GetFigure(FigureRequest) returns (stream Figure) {}
    rpc GetFigureUpdate(FigureDataRequest) returns (stream FigureData) {}
}
