Adding a label to the axis in a dashboard panel

Comments

7 comments

  • Avatar
    SumoLogic SupportAccount

    You need to name the measure/aggregate value w/ the label you want to appear in the y-axis, and the group should be named w/ the label you want for the x-axis. Something like this:

    <scope> | timeslice 1h as Time | sum(dollar_amount) as %"$/hr" by Time

    One caveat, when you rename _timeslice (to "Time") in this case, you'll get the label you want on the x-axis, but the graph will no longer display the tickmark (timeslice) labels.

    0
    Comment actions Permalink
  • Avatar
    Kelly Burdine

    Thanks for the reply. I guess I was hoping there was a way to just add it within the panel. My query is a bit unique. I am parsing a json and wanted to graph the raw values, but since I can only graph aggregated values I simply averaged the values over short periods of time since there is only one log per 10min. So here is the part of my query where I calculate the average. How would I add the y-axis title?
    |json auto "fulla.cost", "pyspark.cost","follow_recommendations.cost","sqoop.cost","engaged_users.cost", "nick_rival_testing.cost", "william.cost" as fulla_cost, pyspark_cost, follow_cost, sqoop_cost, eu_cost, rival_cost, william_cost nodrop

    |(fulla_cost + pyspark_cost + follow_cost + sqoop_cost + eu_cost + rival_cost + william_cost) as total_cost

    |timeslice by 10m

    |avg(fulla_cost) as fulla_avg, avg(pyspark_cost) as pyspark_avg, avg(follow_cost) as follow_avg,avg(sqoop) as sqoop_avg,avg(eu_cost) as eu_avg, avg(rival_cost) as rival__avg, avg(william_cost) as william_avg,avg(total_cost) as avg_total_cost by _timeslice

    0
    Comment actions Permalink
  • Avatar
    SumoLogic SupportAccount

    You have more than one measure, so the label will not display along the y-axis. You can only do this when you have a single measure. Instead, you will have each group appear as its own line (or set of bars) w/ its label in the legend.

    0
    Comment actions Permalink
  • Avatar
    Kelly Burdine

    so there is no way to give the axis a title? Bummer

    0
    Comment actions Permalink
  • Avatar
    SumoLogic SupportAccount

    Think of it from a visual design perspective. How would you label multiple lines of data on the y-axis alone? Would it just be a comma-delimited string of your measures (e.g., "fullaavg, pysparkavg, ..."). If you do that, how do you know which line has which label?

    0
    Comment actions Permalink
  • Avatar
    Kelly Burdine

    No each line of data (i.e. fulla_avg) is clearly labeled in the legend. The y-axis in my query ranges from 0-30. I just wanted to add an axis title that says "$ per hour" so that someone looking at my panel can understand what those numbers mean. Similar to adding an axis title in a microsoft excel graph

    0
    Comment actions Permalink
  • Avatar
    SumoLogic SupportAccount

    Ah I see now. Yea you would have to submit an enhancement request for that.

    0
    Comment actions Permalink

Please sign in to leave a comment.