Problem: Automatic Line Break

Technical support, bug reports and more.

Problem: Automatic Line Break

Postby Thaver2Theta on Wed Jul 28, 2010 9:31 pm

I have a problem in hightchart: I does not know how to realizes an automatic "line break".

Here a picture:
Image
Thaver2Theta
 
Posts: 7
Joined: Wed Jul 28, 2010 9:15 pm

Re: Problem: Automatic Line Break

Postby not on Thu Jul 29, 2010 1:16 pm

Hi,
you can break line manualy using <br/> tag but be careful with this - the spaces inside of the tag aren't allowed. Torstein has explained it here: viewtopic.php?f=9&t=6881&p=32369&hilit=line+break#p32404.
Maciej Piecha,
Highcharts Support Team
User avatar
not
 
Posts: 329
Joined: Mon Jun 07, 2010 4:01 pm

Re: Problem: Automatic Line Break

Postby Thaver2Theta on Thu Jul 29, 2010 2:42 pm

Okay. Thx. :)

I copied the "x-labels" and it works fine:
Code: Select all
options.xAxis.categories = ['label1', 'label2', 'label3', 'label4<br/>label4b_note']


Another Problem: In Version 1.2 the column auf Ralph and their values were not shown in chart and legend.
Now in Version 2.0.1 Ralph is shown in Legend, also the values(unimportant number) in Chart .
The <th>-tag works like <td>-tag. How to say "highchart" that the last column should not to be used?

Code: Select all
<table id="datatable">
  <thead>
    <tr>
      <th></th>
      <th>Jane</th>
      <th>John</th>
      <th>Ralph</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>Apples</th>
      <td>3</td>
      <td>4</td>
      <th>UNIMPORTANT number for Chart</th>
    </tr>
  </tbody>
</table>
Thaver2Theta
 
Posts: 7
Joined: Wed Jul 28, 2010 9:15 pm

Re: Problem: Automatic Line Break

Postby not on Fri Jul 30, 2010 9:28 am

It took me a while to find out that you refer to the Data defined in a HTML table demo.

Well, this is not a core feature of highcharts but a custom implementation. So you can easily change whatever you want in the Highcharts.visualize() function from that demo. There is a line with this code:

Code: Select all
$('th, td', tr).each( function(j) {

... I don't have explain this, do I? :)
Maciej Piecha,
Highcharts Support Team
User avatar
not
 
Posts: 329
Joined: Mon Jun 07, 2010 4:01 pm

Re: Problem: Automatic Line Break

Postby Thaver2Theta on Fri Jul 30, 2010 5:49 pm

That would be very kind. This not my element. I know how to make flash-like designs without jquery, but it's more a hobby for me. So I am not so good in it.

(Your're avatar is sweet. Cute Panther :D )
Thaver2Theta
 
Posts: 7
Joined: Wed Jul 28, 2010 9:15 pm

Re: Problem: Automatic Line Break

Postby tasso85 on Fri Jul 30, 2010 5:59 pm

Panther? Isn't it a Panda? :mrgreen:

Anyway, I think he meant that you just have to remove the 'th' from the selector and you should be fine.
tasso85
 
Posts: 24
Joined: Thu Jul 15, 2010 10:39 am

Re: Problem: Automatic Line Break

Postby Thaver2Theta on Sat Jul 31, 2010 4:35 pm

Yep - Panda ;)

I tried it. It does not works for me. :?
Thaver2Theta
 
Posts: 7
Joined: Wed Jul 28, 2010 9:15 pm

Re: Problem: Automatic Line Break

Postby not on Tue Aug 03, 2010 12:27 pm

Since it's all about applying a custom format of data to the chart, the implementation should be individual for different kinds of tables.

You've already posted an example of your table, but tell me what is exactly the format of the it. Which fields you want do use as categories names and witch (columns or row) as series. So, please, paste the table and just tell me how it should reference the chart. Then I'll prepare a custom parser for you.
Maciej Piecha,
Highcharts Support Team
User avatar
not
 
Posts: 329
Joined: Mon Jun 07, 2010 4:01 pm

Re: Problem: Automatic Line Break

Postby Thaver2Theta on Mon Aug 09, 2010 1:19 am

I would like to hide the column of Ralph with their values in chart as a bar.
However the numbers of column of Ralph should be shown as tooltips (OverHoverEffect).

Here is a picture:

http://www.lupiupload.de/images/2010/08 ... 4cfbe2.jpg
Thaver2Theta
 
Posts: 7
Joined: Wed Jul 28, 2010 9:15 pm

Re: Problem: Automatic Line Break

Postby not on Thu Aug 12, 2010 2:24 pm

I understand that you want to use values of fourth column (under "Ralph" title column) in tooltips for all points in a series.
So check this out: http://jsfiddle.net/G2ENs/ :)
Maciej Piecha,
Highcharts Support Team
User avatar
not
 
Posts: 329
Joined: Mon Jun 07, 2010 4:01 pm


Return to Highcharts Usage

Who is online

Users browsing this forum: Google [Bot], levipage, MSN [Bot], RichardM and 3 guests