{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafonnet-lib/issues/75","repository_url":"https://api.github.com/repos/grafana/grafonnet-lib","labels_url":"https://api.github.com/repos/grafana/grafonnet-lib/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafonnet-lib/issues/75/comments","events_url":"https://api.github.com/repos/grafana/grafonnet-lib/issues/75/events","html_url":"https://github.com/grafana/grafonnet-lib/pull/75","id":324710661,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5MjM0Mjk0","number":75,"title":"improve(graph panel) possibility to override Y axes","user":{"login":"Voronenko","id":701233,"node_id":"MDQ6VXNlcjcwMTIzMw==","avatar_url":"https://avatars3.githubusercontent.com/u/701233?v=4","gravatar_id":"","url":"https://api.github.com/users/Voronenko","html_url":"https://github.com/Voronenko","followers_url":"https://api.github.com/users/Voronenko/followers","following_url":"https://api.github.com/users/Voronenko/following{/other_user}","gists_url":"https://api.github.com/users/Voronenko/gists{/gist_id}","starred_url":"https://api.github.com/users/Voronenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Voronenko/subscriptions","organizations_url":"https://api.github.com/users/Voronenko/orgs","repos_url":"https://api.github.com/users/Voronenko/repos","events_url":"https://api.github.com/users/Voronenko/events{/privacy}","received_events_url":"https://api.github.com/users/Voronenko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-05-20T13:40:23Z","updated_at":"2018-08-25T19:00:02Z","closed_at":"2018-08-23T20:31:08Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/grafana/grafonnet-lib/pulls/75","html_url":"https://github.com/grafana/grafonnet-lib/pull/75","diff_url":"https://github.com/grafana/grafonnet-lib/pull/75.diff","patch_url":"https://github.com/grafana/grafonnet-lib/pull/75.patch"},"body":"Possibility to configure Y axes setup , which is often thingy.\r\n\r\nCode might be as\r\n\r\n```\r\n        .resetYaxes()\r\n        .addYaxis(format=\"none\", min=0)\r\n        .addYaxis(format=\"s\", min=0)\r\n```\r\n\r\nalso adds method allowing to override  Series `.addSeriesOverride` , kind of\r\n\r\n```\r\n\r\n        .addSeriesOverride(\r\n            {\r\n            \"alias\": \"TargetResponseTime_Average\",\r\n            \"yaxis\": 2\r\n            }\r\n        )\r\n\r\n```\r\n\r\nalso possibility in constructor to override `value_type`  rather than have it hardcoded.\r\n\r\nassuming that by default folks use default Y axes setup as we had previously \r\n\r\nExample from working case:\r\n\r\n```\r\nlocal grafana = import \"lib/grafonnet/grafana.libsonnet\";\r\nlocal graph_panel = grafana.graphPanel;\r\n\r\nlocal grafana_ext = import \"lib/sa_grafanonnet/main.libsonnet\";\r\n\r\nlocal albMetrics = grafana_ext.metrics.alb;\r\n\r\nlocal metricTarget = grafana_ext.targets.metric;\r\n\r\n{\r\n    new(\r\n        datasource = \"aws\",\r\n    )::\r\n        graph_panel.new(\r\n            title = \"RequestCount / Latency\",\r\n            ------------- other props -------------\r\n            aliasColors={},\r\n            value_type='cumulative'\r\n        )\r\n        .addTarget(\r\n            metricTarget.new(\r\n                namespace = albMetrics.Namespace,\r\n                metric = albMetrics.Metric_RequestCount,\r\n                refId = \"A\"\r\n            )\r\n        )\r\n        .addTarget(\r\n            metricTarget.new(\r\n                namespace = albMetrics.Namespace,\r\n                metric = albMetrics.Metric_TargetResponseTime,\r\n                refId = \"B\"\r\n            )\r\n        )\r\n        .addSeriesOverride(\r\n            {\r\n            \"alias\": \"Latency_Average\",\r\n            \"yaxis\": 2\r\n            }\r\n        )\r\n        .addSeriesOverride(\r\n            {\r\n            \"alias\": \"TargetResponseTime_Average\",\r\n            \"yaxis\": 2\r\n            }\r\n        )\r\n        .resetYaxes()\r\n        .addYaxis(format=\"none\", min=0)\r\n        .addYaxis(format=\"s\", min=0)\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/grafana/grafonnet-lib/issues/comments/415989692","html_url":"https://github.com/grafana/grafonnet-lib/pull/75#issuecomment-415989692","issue_url":"https://api.github.com/repos/grafana/grafonnet-lib/issues/75","id":415989692,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTk4OTY5Mg==","user":{"login":"Voronenko","id":701233,"node_id":"MDQ6VXNlcjcwMTIzMw==","avatar_url":"https://avatars3.githubusercontent.com/u/701233?v=4","gravatar_id":"","url":"https://api.github.com/users/Voronenko","html_url":"https://github.com/Voronenko","followers_url":"https://api.github.com/users/Voronenko/followers","following_url":"https://api.github.com/users/Voronenko/following{/other_user}","gists_url":"https://api.github.com/users/Voronenko/gists{/gist_id}","starred_url":"https://api.github.com/users/Voronenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Voronenko/subscriptions","organizations_url":"https://api.github.com/users/Voronenko/orgs","repos_url":"https://api.github.com/users/Voronenko/repos","events_url":"https://api.github.com/users/Voronenko/events{/privacy}","received_events_url":"https://api.github.com/users/Voronenko/received_events","type":"User","site_admin":false},"created_at":"2018-08-25T19:00:02Z","updated_at":"2018-08-25T19:00:02Z","author_association":"CONTRIBUTOR","body":"@roidelapluie  Oops, lost from my personal backlog. Yes, still interested. I am using forked version on my side with that logic, will address tests for PR."}}
{"actor":{"display_login":"Voronenko"}}