You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "Tinkoff DWH (JIRA)" <ji...@apache.org> on 2017/03/13 07:57:04 UTC

[jira] [Created] (ZEPPELIN-2252) Discreteness of line charts

Tinkoff DWH created ZEPPELIN-2252:
-------------------------------------

             Summary: Discreteness of line charts
                 Key: ZEPPELIN-2252
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-2252
             Project: Zeppelin
          Issue Type: Improvement
          Components: front-end
            Reporter: Tinkoff DWH
            Assignee: Tinkoff DWH


spark interpreter

{code}
var text = """g1,1
g1,1
g1,2
g1,3
g1,5
g1,5
g2,1
g2,1
g2,2
g2,2
g2,6
g2,6
g2,7
g2,7
g2,7"""

val array = sc.parallelize(text.split("\n"))

case class Line(group: String, value: Integer)

val line = array.map(s => s.split(",")).map(
    s => Line(s(0), 
            s(1).toInt
        )
).toDF()
line.registerTempTable("lines")
{code}

Generate charts
{code}
%sql
select *from lines
{code}

The line is drawn where there is no data, but the default code is set to 0 (for Y)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)